public static void main(String[] args){
Scanner ii=new Scanner(System.in);
System.out.println("请输入数字1·2·3");
try{
a=ii.nextInt();
switch(a){
case 1:
System.out.println("石头");break;
case 2:
System.out.println("剪刀");break;
case 3:
System.out.println("布");break;
default:
System.out.println("请输入正确的值1·2·3中任选");
}
System.out.print("\n\n");
}catch(Exception e){
System.out.println("输入有误"+"\n\n");
}
System.out.print("程序正常进行中…"+"\n\n");
}
}