Exam AND-401 All QuestionsBrowse all questions from this exam
Question 91

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

    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
MmadiOption: D

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