-
Posts
11 -
Joined
-
Last visited
Reputation Activity
-
NitroUK reacted to Mira Yurizaki in A noobs question java
In Java, assuming the class didn't override it, the == operator on two variables objects checks if their references are the same. That is, if they're pointing to the same object.
So no, that won't work. Use the String.equals() method to check if the contents are the same. See https://www.geeksforgeeks.org/difference-equals-method-java/