This question already has an answer here:
- How do I compare strings in Java? 23 answers
Help! I need to check, if first text equals second!
pass = readPassFromFile()
if(passTxt.getText().toString()==pass)
{
success()
} else {
fail()
}
I entered right password into EditText. Variable pass is a line from file. I used toast to see passwords. Result ('-' is a separator, '[]' is start/end): [Qwerty-Qwerty].
Aucun commentaire:
Enregistrer un commentaire