Computer Applications

Mention the purpose and syntax of equals() method.

Java String Handling

1 Like

Answer

The equals() method compares two strings to check whether they are equal or not. It checks the case of the character as well. The result is a boolean value true if they are equal, otherwise the result is false.
Syntax:
string1.equals(string2)

Answered By

1 Like


Related Questions