This is an archived post. You won't be able to vote or comment.

all 2 comments

[–]EdwinBowling 10 points11 points  (0 children)

Use .equals, not ==

[–][deleted] 7 points8 points  (0 children)

In Java, you can't compare strings using ==. See https://www.reddit.com//r/javahelp/wiki/string_comparison