try{
   a=(char)System.in.read();
    if (a=='b'){
     break outer;
    }
    if (a=='c'){
     continue outer;
    }
}catch(IOException e) { e.printStackTrace();}

解决方案 »

  1.   

    a=(char)System.in.read();涉及到i/o操作 ,所以因该抛开出 IOException
    你可以查查  System.in.read()  方法 应该 throws  IOException 的try{
       a=(char)System.in.read();
    }catch(IOException e) { 
    }
      

  2.   

    你用这段code把你的替换掉.必须用try{}catch(){}把异常扑获.