In Java, the String equals() method compares the two given strings based on the data/content of the string . If all the contents of both the strings are the same, it returns true. If all characters are not matched, then it returns false.
In Java, the String equals() method compares the two given strings based on the data/content of the string . If all the contents of both the strings are the same, it returns true. If all characters are not matched, then it returns false.