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

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);

View Answer

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