Created
January 27, 2018 14:32
-
-
Save hanh090/3a4e0bbe5bf784e1ae07acb293767ee2 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
import static java.lang.System.out; | |
out.println("Do you love me?"); | |
Scanner sc=newScanner("System.in"); | |
String result=sc.nextLine(); | |
switch(result){ | |
case"yes":out.println("I love you too");break; | |
case"no":out.println("Please choose another answer");break; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment