一个小程序!
class  Demo
{
  public static void main(String[] args) throws Exception
  {
    int a=0;
    w:while(true){
      for(int i=0; i<3; i++){
        int ch=System.in.read();
        if(ch=='x')
           continue w;
        else if(ch=='y')
           break w;
        else
           System.out.print((char)ch+""+(++a));
      }
      System.out.println(">");
    }
    System.out.println();
  }
}为什么在DOS命令行中输入abcde
结果是
abcde
a1b2c3>
6>e57
d为什么没有输出?
如果输入abcdef
abcdef
a1b2c3>
d4e5f6>
7
8
输出结果比较费解,哪位达人可以详细的讲解一下读取流程?
先谢过!