comparison of two Strings doesn’t work in android [duplicate]

Use string1.equalsIgnoreCase("something) or .equals("Something");

With == (for strings) in java you are comparing they are of same reference. Like you did is the test if both of them are strings objects.

Leave a Comment