Java – Small Rock Paper Scissors game. I cant find error
Java – Small Rock Paper Scissors game. I cant find error
To compare Strings, instead of ==
you must use equals()
method:
str1.equals(str2)
When you use ==
you are comparing memory references, since String
is not a primitive data type in Java. Try searching about it on Google.