1.

How will you get the data in secondActivity? Refer question 10.

A. Intent intent=new Intent; String str= intent.getStringExtra("name"); Toast.makeText(this, str , Toast.LENGTH_LONG).show();
B. Intent intent=getIntent(); String str= intent.getStringExtra("name"); Toast.makeText(this, str , Toast.LENGTH_LONG).show();
C. Intent intent=getIntent(); String str= intent.getText("name"); Toast.makeText(this, str , Toast.LENGTH_LONG).show();
D. None of the above.
Answer» C. Intent intent=getIntent(); String str= intent.getText("name"); Toast.makeText(this, str , Toast.LENGTH_LONG).show();


Discussion

No Comment Found