0

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].

1kpunep1
  • 13
  • 2

1 Answers1

0
pass = readPassFromFile()
if(pass.equalsIgnoreCase(passTxt.getText().toString()))  
{
    success()
} else {
    fail()
}
tiny sunlight
  • 6,231
  • 3
  • 21
  • 42