static boolean onceAgain() throws IOException{
System.out.print("Need input another idNumber?(Y/N) :");
BufferedReader br =new BufferedReader(new InputStreamReader(System.in));
String str= br.readLine();
char tempc=str.charAt(0);
if(tempc == 'Y' || tempc == 'y'){
return true;
}
else if(tempc == 'N' || tempc == 'n'){
return false;
}
else{
System.out.println("Choose Error.Choose again.");
onceAgain();
}
return false;
}
@shijianws 懂你说的意思了。。。但是要怎么改才能让输错之后正确输入继续判断下去啊?