AND-401 Exam QuestionsBrowse all questions from this exam

AND-401 Exam - Question 49


What does the following code achieve?

Intent intent = new Intent(FirstActivity.this, SecondActivity.class); startActivityForResult(intent);

Show Answer
Correct Answer: B

The code snippet creates an Intent to switch from FirstActivity to SecondActivity and calls startActivityForResult to start the SecondActivity. This implies that the FirstActivity expects a result back from the SecondActivity after it finishes. Hence, it starts a sub-activity that can return a result.

Discussion

1 comment
Sign in to comment
MmadiOption: B
Dec 31, 2022

B. Starts a sub-activity