str1. equals(str2); Here str1 and str2 both are the strings which are to be compared.
Read moreHow can we compare two strings give an example?
str1. equals(str2); Here str1 and str2 both are the strings which are to be compared.
Read moreHow do you compare two strings by ignoring the case give an example?
The equalsIgnoreCase() method compares two strings, ignoring lower case and upper case differences. This method returns true if the strings are equal, and false if not. Tip: Use the compareToIgnoreCase() method to compare two strings lexicographically, ignoring case differences.
Read moreHow do you ignore a case in a String?
equalsIgnoreCase() method compares this String to another String, ignoring case considerations. Two strings are considered equal ignoring case if they are of the same length and corresponding characters in the two strings are equal ignoring case.
Read more