Java -- Char array to string problem
Go to solution
Solved by Ciccioo,
in java you can't use the == operator to compare objects
what you're actually comparing is not the strings, but the strings references
to do the string comparison you have to use the equals() method
if( s.equals(cs) )
-
Featured Topics
-
Topics
-
0
-
5
-
0
-
3
-
Nov845 ·
Posted in Programs, Apps and Websites0 -
0
-
Sanderdrejer ·
Posted in Troubleshooting2 -
smore09 ·
Posted in Graphics Cards2 -
VL_Hermes ·
Posted in Laptops and Pre-Built Systems3 -
9
-
-
play_circle_filled
Latest From ShortCircuit:
Lian-Li, do this on all of your cases! - Lian-Li O11D x Lamborghini
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