AND-401

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);

  1. Starts a sub-activity
  2. Starts a service
  3. Sends results to another activity.
  4. 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?

  1. Detector
  2. OnTapListener
  3. OnClickDetector
  4. OnClickListener

Question 23

Which of the following is not an Activity lifecycle call-back method?

  1. onStart
  2. onCreate
  3. onPause
  4. onBackPressed

Question 24

Which method is used to close an activity?

  1. Destroy()
  2. Finish()
  3. Stop()
  4. Close()

Question 25

Which of the following Activity life-cycle methods is called once the activity is no longer visible?

  1. onStop
  2. onPause
  3. onDestroy
  4. onHide