public static void main(String[] args) {
System.out.println("欢迎进入游戏迷你平台");
System.out.println("请选择你喜欢玩的游戏:");
System.out.println("***********************");
System.out.println("1.斗地主");
System.out.println("2.斗牛");
System.out.println("3.泡泡龙");
System.out.println("4.连连看");
System.out.println("************************");
Scanner scanner = new Scanner(System.in);
System.out.println("请输入数字:");
int num=scanner.nextInt();
switch (num){
case 1:
System.out.println("你已进入斗地主房间!");
break;
case 2:
System.out.println("你已进入斗牛房间!");
break;
case 3:
System.out.println("你已进入泡泡龙房间!");
break;
case 4:
System.out.println("你已进入连连看房间!");
}
}
课堂笔记和练习,希望对大家有帮助!