AND-401 Exam QuestionsBrowse all questions from this exam

AND-401 Exam - Question 5


What does the following line of code achieve?

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

Show Answer
Correct Answer: C

The line of code in question 'Intent intent = new Intent(FirstActivity.this, SecondActivity.class);' creates an explicit intent. An explicit intent specifies the exact component inside the app that should be launched. In this case, it indicates that the activity 'SecondActivity' should be launched from 'FirstActivity'. Options C and D are indeed identical, so either would be correct.

Discussion

2 comments
Sign in to comment
MmadiOption: C
Dec 31, 2022

D. Create an explicit Intent

sim9Option: C
Mar 30, 2023

Both C and D options are same