PrepAway - Latest Free Exam Questions & Answers

Which of the following lines of code starts activity Activity2 from a current activity Activity1?

Which of the following lines of code starts activity Activity2 from a current activity Activity1?

PrepAway - Latest Free Exam Questions & Answers

A.
Intent intent = new Intent(this,new Activity2());
startActivity(intent);

B.
Intent intent = new Intent(new Activity2());
startActivity(intent);

C.
Intent intent = new Intent (Activity1.class,Activity2.class);
startActivity(intent);

D.
Intent intent = new Intent(this,Activity2.class);
startActivity(intent);

One Comment on “Which of the following lines of code starts activity Activity2 from a current activity Activity1?


Leave a Reply

Your email address will not be published. Required fields are marked *