how to properly execute if in android?
<p>Can anyone please tell why the <code>if</code> statement never gets executed even though I enter <code>ran</code> in the edit text field and press <kbd>ok</kbd>? When the user enters <code>ran</code> and presses the button <kbd>ok</kbd>, I want another button to become visible which enables him to stop the current activity. Basically I want to know why the <code>if</code> is skipped.</p>

<pre><code>public class Reciever extends Activity{

    protected static final String TAG = null;
    private Button ok,stp;
    private TextView tv;
    private EditText ev;
private String s1,s2,s3,s4;
@Override
    protected void onCreate(Bundle savedInstanceState) 
    {
        super.onCreate(savedInstanceState);
        s1="nar";
        setContentView(R.layout.stop);
        tv=(TextView) findViewById(R.id.textView1);
        tv.setText(s1);

        ev=(EditText) findViewById(R.id.editText1);
    ok=(Button) findViewById(R.id.ok_button);
    ok.setOnClickListener(new OnClickListener() {

        @Override
        public void onClick(View v) {
            s2="ran";
            tv.setText(ev.getText().toString());
            s3=ev.getText().toString();
            if(s3==s2)//not going inside this loop
            {
            stp=(Button) findViewById(R.id.stopb);

            stp.setVisibility(View.VISIBLE);
            stp.setOnClickListener(new OnClickListener() {

                @Override
                public void onClick(View v) {
                    // TODO Auto-generated method stub
                finish();   
                }
            });

        }

    }
    });
    }
    }
</code></pre>
