java tutorial - Java Strings equals() method - java programming - learn java - java basics - java for beginners
Learn java - java tutorial - Java Strings equals() method - java examples - java programs
Description
Java - The equals () method - compares the string with the specified object. The result is true only if the argument is not null and is a string object (String) that represents the same sequence of characters as this object.
Syntax
The syntax of the method is:
Options
Detailed information about the parameters:
- anObject is the object with which to compare this string.
Return value
- In Java, equals () returns true if the lines are equal; otherwise false.