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 ::
need an explanation for this answer? contact us directly to get an explanation for this answer