Tuesday, May 28, 2019

java - How to compare two strings are equal in value, what is the best method?




Always confused about this stuff. Anyone can help?


Answer




string1.equals(string2) is the way.



It returns true if string1 is equals to string2 in value. Else, it will return false.



equals reference


No comments:

Post a Comment

plot explanation - Why did Peaches' mom hang on the tree? - Movies & TV

In the middle of the movie Ice Age: Continental Drift Peaches' mom asked Peaches to go to sleep. Then, she hung on the tree. This parti...