Created
December 21, 2019 04:16
-
-
Save gauravkukade/0e6334c5ae880cf731d292ab6abaf6b5 to your computer and use it in GitHub Desktop.
equals() method of the String class in Java https://coderolls.com/compare-strings-in-java/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public boolean equals(Object anObject) | |
It compare this string with the argument strings and return true if the argument is not null and contains the same character as the specified string. | |
param - | |
another string | |
returns - | |
true - if argument is not null and it contains same characters as the specified string | |
false - if the argument is null or it does not contain same characters as the specified string | |
ex. firstString.equals(secondString) | |
// returns true if and only if the secondString is not null and contains the same characters as firstString. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment