AND-401 practice questions, page 5 of 9, with answer review and explanations.
Question 21
What does this code do? Intent intent = new Intent(); intent.setAction(Intent.ACTION_VIEW); intent.setData(android.net.Uri.parse("http://www.androidatc.com")); startActivity(intent);
Starts a sub-activity
Starts a service
Sends results to another activity.
Starts an activity using an implicit intent.
Question 22
Which of the following is a Java call-back method invoked when a view is clicked?
Detector
OnTapListener
OnClickDetector
OnClickListener
Question 23
Which of the following is not an Activity lifecycle call-back method?
onStart
onCreate
onPause
onBackPressed
Question 24
Which method is used to close an activity?
Destroy()
Finish()
Stop()
Close()
Question 25
Which of the following Activity life-cycle methods is called once the activity is no longer visible?