I just want to check if the given passwords are not equal to each other. So I had made this:
String password = etPassword.getText().toString().trim();
String confirmPassword = etConfirmPassword.getText().toString().trim();
if (password != confirmPassword) {
Toast.makeText(getApplicationContext(),
"Passwords do not match", Toast.LENGTH_LONG)
.show();
}
But somehow it doesn't work. I have logged it when I gave an input value "e" for both passwords.