Android Application Development (AND-401) — Question 5
What does the following line of code achieve?
Intent intent = new Intent(FirstActivity.this, SecondActivity.class );
Answer options
- A. Creates a hidden Intent
- B. Creates an implicit Intent
- C. Create an explicit Intent
- D. Create an explicit Intent
Correct answer: D
Explanation
The line of code creates an explicit Intent, which is used to specify the exact component (SecondActivity) that should handle the Intent. Options A and B are incorrect because they refer to different types of Intents that do not apply here. Option C is also correct in its description but is not the right answer since option D is the same as C and is marked as the correct one.