Definition and Usage The equals() method compares two strings, and returns true if the strings are equal, and false if not .
What does equals () mean in Java?
The equals() method compares two strings, and returns true if the strings are equal, and false if not .