public int menu(){
System.out.println("根据提示输入功能序号:");
System.out.println("1,管理员");
System.out.println("2,普通用户");
System.out.println("0,退出");
String s = input.nextLine();
int funcNum = -1;
try{
funcNum = Integer.parseInt(s);
}catch (NumberFormatException e){
return menu();
}
if(funcNum < 0 || funcNum > 2){
return menu();
}
return funcNum;
}