How do I compare strings in Java?
sam
378
Points
48
Posts
|
Hi, How do I compare strings in Java? |
Answers
Brian
2376
Points
13
Posts
|
Hi Sam, use .equals() method: string1.equals(string2)
It returns true if string1 is equals to string2 in value. Else, it will return false.
Posted On:
31-Jul-2015 00:18
|
Blog
Active User (0)
No Active User!