Suppose that there are two activities in an application named FirstActivity and SecondActivity. You want to send website name from ActivityOne to ActivityTwo. What code you will write? Suppose that website name is “CareerRide.com”

Suppose that there are two activities in an application named FirstActivity and SecondActivity. You want to send website name from ActivityOne to ActivityTwo. What code you will write? Suppose that website name is “CareerRide.com”



A) Intent intent=new Intent (this, SecondActivity.class);

intent.putExtra("name", “CareerRide.com”);

startActivity(intent);


B) Intent intent=new Intent (this, SecondActivity.class);

intent.putExtra( “CareerRide.com”);

startActivity(intent);


C) Intent intent=new Intent ();

intent.putExtra("name", “CareerRide.com”);

startActivity(intent);


D) None of the above.


Answer: A


Learn More :