I am learning android I tried following codeline but it\'s giving me error please give me suggestions, that how can I compare two edittext\'s text.
I have find the best solution..
if(Password.getText().toString().trim().matches(confirmPassword.getText().toString().trim()))
{
// then do your work
}
else
//otherwise show error message.
whereas
Password = (EditText)findViewById(R.id.pass);
confirmPassword = (EditText)findViewById(R.id.confirmpass);
are two editText.