StringComparison Program
Description
This program prompts the user to input two strings and then compare them using == operator, equals method, and compareTo method.Associated Concepts:
String method:
equals
equalsIgnoreCase
compareTo
compareToIgnoreCase
equals
equalsIgnoreCase
compareTo
compareToIgnoreCase
Algorithm:
Input two string objects from the keyboard
Use == operator to compare them and print a message accordingly
Use equals() or equalsIgnoreCase() method to compare them and print a message accordingly
Use compareTo() or compareToIgnoreCase() method to compare them and print a message accordingly
Use == operator to compare them and print a message accordingly
Use equals() or equalsIgnoreCase() method to compare them and print a message accordingly
Use compareTo() or compareToIgnoreCase() method to compare them and print a message accordingly