Java: What is the difference between comparing strings with == and "str.equals()"?
By
RockSolid1106
in Programming
in Programming
Go to solution
Solved by tikker,
The equals method checks if the contents of the string are the same. == checks if they are the same object.
https://stackoverflow.com/questions/513832/how-do-i-compare-strings-in-java
-
Topics
-
0
-
0
-
0
-
0
-
l3eyond ·
Posted in Programs, Apps and Websites0 -
1
-
Serendipity1344 ·
Posted in Graphics Cards4 -
1
-
1
-
5
-

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