try{
a=(char)System.in.read();
if (a=='b'){
break outer;
}
if (a=='c'){
continue outer;
}
}catch(IOException e) { e.printStackTrace();}
a=(char)System.in.read();
if (a=='b'){
break outer;
}
if (a=='c'){
continue outer;
}
}catch(IOException e) { e.printStackTrace();}
你可以查查 System.in.read() 方法 应该 throws IOException 的try{
a=(char)System.in.read();
}catch(IOException e) {
}