Last active
February 18, 2017 12:15
-
-
Save mirsahib/503b2a40f42a0978a3663d7f7294f299 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
public class TestDocument { | |
public static void main(String[] args) { | |
Scanner input = new Scanner(System.in); | |
String a = input.nextLine(); | |
String b = "a-"; | |
//when the user input is a- case 1 return false | |
//case 1 | |
System.out.println(a=="a-"||a=="A-"); | |
//case 2 | |
System.out.println(b=="a-"||b=="A-"); | |
//System.out.println(a.length()); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment