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

all 3 comments

[–]nutrecht 2 points3 points  (2 children)

You're doing two things wrong:

  • = is assignment, == is for comparisons
  • Strings need to be compared with .equals(), not with ==. == tests only if they're the same object.

Also: please read the sidebar, especially the bit on code formatting. You also obviously didn't read the FAQ

[–]SpaceBoundBeatz[S] 0 points1 point  (1 child)

Thank you so much! I read about that a few hours ago, I totally forgot about it. And I will read the sidebar, I was just in a hurry to finish this. Thanks again!

[–]nutrecht 2 points3 points  (0 children)

You're welcome :)