AND-401 Exam QuestionsBrowse all questions from this exam

AND-401 Exam - Question 91


Which of the following lines of code is used to pass a value to the next activity?

Show Answer
Correct Answer: D

The correct line of code to pass a value to the next activity is: Intent i = new Intent(this,newActivity); i.putExtra("value1","test");. The putExtra method is used to add extended data to the intent that can be retrieved by the launched activity.

Discussion

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

D. Intent i = new Intent(this,newActivity); i.putExtra("value1","test");