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
-
Mark Kaine ·
Posted in Displays0 -
1
-
1
-
tippytipper ·
Posted in Storage Devices1 -
2
-
AlyShazli ·
Posted in New Builds and Planning18 -
4
-
Emmanuel Katto ·
Posted in Peripherals3 -
3
-
4
-
-
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