I have two activity , the first activity pass value to Second activity but the value is sent incorrectly that is the code for onclick in first activity
 Intent nextScreen = new Intent(EgyptActivity.this, ViewRecord.class);
            nextScreen.putExtra("name", "1".toString() );
            startActivity(nextScreen);
second activity code is
Bundle i = getIntent().getExtras();
        Receiving the Data
     String name = i.getString("name");
         Log.i ("name", name);
    String ne="1";
    Log.i ("ne", ne);
    if (name==ne)
    {Log.i ("info", ne);}
     if (name!=ne) 
     {Log.i ("info", "2");}
        }
LogCat
name: 1
ne: 1
info: 2
so please would any one tell me why the value name!=ne
 
    