Programming

Java String.equals versus ==

steloflute 2012. 7. 23. 20:33
http://stackoverflow.com/questions/767372/java-string-equals-versus

 

Use the String.equals(String other) function to compare strings, not the == operator.

The function checks the actual contents of the string, the == operator checks whether the references to the objects are equal.