String methods – equals() and equalsIgnoreCase()

These methods are used to compare 2 string objects. If both String matches, returns true else false. Equals(): Equals is used to compare 2 strings and it is case sensitive. e.g. The Strings “JAVA” and...