In this section, you will learn how to compare two string in java.
Tutorial Details:
The java lang package provides a method to compare two with their case either upper and lower. The equals() method provides the facility of comparing the two strings.
The following program uses the equals() method and helps you to compare the two strings. If both strings are equal, it will display a message "The given strings are equal" otherwise it will show "The given string are not equal".