import java.util.Scanner;
public class GoToHeiMa {
/**
* @param args
*/
public static void main(String[] args) throws Exception {
Scanner scanner1 = new Scanner(System.in);
System.out.println("Do You Want to go to HeiMa? Y/N");
String answer= scanner1.nextLine();
System.out.println("your answer is "+answer);
if (answer.equals("y")){
System.out.println("Please enter your JavaLevel(1~10)");
Scanner scanner2 = new Scanner(System.in);
int level= scanner2.nextInt();
if (level < 10 )
System.out.println("Good Good Study,Day Day Up");
else
System.out.println("congratulations!");
}
else
System.out.println("ByeBye!");
}
}
|