public void choiceItem(Scanner sc,List<Clock> clocks){ System.out.println( "请选择:" + "1.添加闹钟" + "2.删除闹钟" + "3.修改闹钟" + "4.查看闹钟" + "5.退出系统"); int input = sc.nextInt(); switch(input){ case 1:addClock(sc,clocks);break; case 2:delClock(sc, clocks);break; case 3:setClock();break; case 4:checkClock(clocks);break; case 5:quit();break; default:break; } }