A noobs question java
Go to solution
Solved by Mira Yurizaki,
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/
-
Featured Topics
-
Topics
-
0
-
4
-
0
-
1
-
5
-
1
-
JFRStudent ·
Posted in Photography and Videography1 -
5
-
6
-
amir2927 ·
Posted in CPUs, Motherboards, and Memory11
-
-
play_circle_filled
Latest From Linus Tech Tips:
I Am Not Buying A Super Computer - WAN Show May 3, 2024
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now