Q:

passing values to another activity

I am trying to pass value "0000002" in string format to next activity like below:
Intent pass = new Intent(this, SecondActivity.class);
pass.putExtras("EmpID", "0000002");

In second activity
Bundle info = getIntent().getExtras();
System.out.println("Test " + info.getString("EmpID")); // this line printing "null" value instead of "0000002".  

I am able to pass and fetch the other strings successfully.  I am not able to fetch the EmpID. 
Please help me. 

A:

Here is a Sample
From 1st Activity
Bundle localBundle = new Bundle();
localBundle.putString("Loan Amount", editText1.getText().toString());
localBundle.putString("Loan Tenture", editText2.getText().toString());
localBundle.putString("Interest Rate", editText3.getText().toString());
Intent localIntent = new Intent(this, Activity2.class);
localIntent.putExtras(localBundle);
startActivity(localIntent);

and in Activity2
String string1 = getIntent().getStringExtra("Loan Amount");
String string2 = getIntent().getStringExtra("Loan Tenture");
String string3 = getIntent().getStringExtra("Interest Rate");

For your case, you can use like
Bundle localBundle = new Bundle();
localBundle.putString("EmpID", "0000002");
Intent pass = new Intent(this, SecondActivity.class);
pass.putExtras(localBundle);
startActivity(pass);

and in SecondActivity you can get the EmpId like
String empId = getIntent().getStringExtra("EmpID");

----------------- Another Way -----------------
Intent pass = new Intent(this, SecondActivity.class);
pass.putExtra("EmpID", "0000002");
startActivity(pass);

In second activity you can get the EmpId like
Bundle bundle = getIntent().getExtras();
String empId = bundle.getString("EmpID"); 

