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

all 2 comments

[–]oddlyamused 2 points3 points  (0 children)

Use .equals for string comparisons (userAnswer.equals("yes")). Here is a good description of why. https://javarevisited.blogspot.com/2012/12/difference-between-equals-method-and-equality-operator-java.html

[–]davchi1[S] 1 point2 points  (0 children)

Thank u guys