Compare Two Strings Java Program
Compare Two Strings Java Program In this post, we will learn how to compare two Strings using a simple Java program. We can use the String class in-built method compareTo() method to compare strings. The method returns zero if the strings are equal. The method signature is as follows: public int compareTo(String anotherString) Java program […]