nerdexam
Android

AND-401 · Question #34

Consider the following code: Intent intent = new Intent(); intent.setAction(Intent.ACTION_VIEW); startActivity(intent); Which of the following is correct about the code above?

The correct answer is D. When it is executed, the system starts an intent resolution process to start the right Activity. See the full explanation below for the reasoning.

Question

Consider the following code:

Intent intent = new Intent(); intent.setAction(Intent.ACTION_VIEW); startActivity(intent); Which of the following is correct about the code above?

Options

  • AIt sends a result to a new Activity in a Bundle.
  • BIt will not compile without adding the INTERNET permission the Manifest file.
  • CIt starts any activity in the application that has a WebView in its layout.
  • DWhen it is executed, the system starts an intent resolution process to start the right Activity.

How the community answered

(67 responses)
  • A
    12% (8)
  • B
    3% (2)
  • C
    6% (4)
  • D
    79% (53)

Community Discussion

No community discussion yet for this question.

Full AND-401 Practice