==
tests for reference equality.
.equals
tests for value equality.
Threfore you should use:
if (lista.getString(0).equals("username"))
See How do I compare strings in Java?
solved condition == between string and constant [duplicate]
==
tests for reference equality.
.equals
tests for value equality.
Threfore you should use:
if (lista.getString(0).equals("username"))
See How do I compare strings in Java?
solved condition == between string and constant [duplicate]