an android app code
string comparison not working.it is going to the next activity even if password does not match neeed help.Code is pasted below

          if(m.equals(w))
			{
			Toast.makeText(getApplication(), "done", Toast.LENGTH_SHORT).show();
			Intent intent = new Intent();
			intent.setClass(v.getContext(),Mysubactivity.class);
			startActivity(intent);
				}
			}
i have declared m and w as two strings and assgined them to edittext using string m=et.getText.toString();
an android app code
===

string comparison not working.it is going to the next activity even if password does not match neeed help.Code is pasted below

          if(m.equals(w))
			{
			Toast.makeText(getApplication(), "done", Toast.LENGTH_SHORT).show();
			Intent intent = new Intent();
			intent.setClass(v.getContext(),Mysubactivity.class);
			startActivity(intent);
				}
			}
i have declared m and w as two strings and assgined them to edittext using string m=et.getText.toString();