Why does this code get a forceclose error?
<pre><code>public class main extends Activity {
    /** Called when the activity is first created. */
    EditText username,password1;
    Button sub;
    String uname,pass;

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);

        sub.setOnClickListener(new View.OnClickListener() {

            @Override
            public void onClick(View v) {
                // TODO Auto-generated method stub
            username = (EditText) findViewById(R.id.uname);
            password1 = (EditText) findViewById(R.id.editText2);
            uname = username.getText().toString();
            pass = password1.getText().toString();

            if (uname == "Azhar")
            {
                if (pass == "azhar")
                    Toast.makeText(main.this, "user is authenticated", Toast.LENGTH_SHORT);
                else
                    Toast.makeText(main.this, "Password Invalid", Toast.LENGTH_SHORT);
            }
            else {
                Toast.makeText(main.this, "User or Password Invalid", Toast.LENGTH_SHORT);
            }
            }
        });

    }
}
</code></pre>
