Write a Java Program to Compare Two Strings using compareTo() Function

By | February 9, 2017

Java Program to Compare Two Strings


To compare two string in Java Programming, you have to ask to the user to enter the two string and start comparing using the compareTo() method.

Following Java Program ask to the user to enter the two string to check whether the two strings are equal or not :

 

SOURCE CODE ::

 

 

OUTPUT ::

 

 

Leave a Reply