Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

string comparison using == in java

In Java Strings, the == operator is used to check the reference of both the string objects.
Use .equals method instead:
str1.equals(str2)
Source by dzone.com #
 
PREVIOUS NEXT
Tagged: #string #comparison #java
ADD COMMENT
Topic
Name
7+1 =