Created
January 13, 2018 19:40
-
-
Save weezqyd/04987ff2ba5c938dc00131b113e035d8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package stringCompare; | |
import java.util.Scanner; | |
public class stingCompare { | |
private static Scanner scanner = new Scanner( System.in ); | |
/** | |
* Application entry point | |
*/ | |
public static void main(String args[]) { | |
System.out.println("Java String comparison"); | |
System.out.println("Provide First String"); | |
// Read first string from the user. | |
String input = scanner.nextLine(); | |
System.out.println("Provide Second String"); | |
// Read first string from the user. | |
String input2 = scanner.nextLine(); | |
if(input.equalsIgnoreCase(input2)) { | |
System.out.println("The two strings are equal"); | |
} else { | |
System.out.println("The provided strings are not equal"); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment