You can compare two strings using either equals() method or compareTo() method . Where, The equals() method compares this string to the specified object.9 Şub 2018
Read moreHow do you make string comparison case sensitive?
To perform this operation the most preferred method is to use either toUpperCase() or toLowerCase() function.
Read more