新人,有关输入输出流的问题

时间:2015-01-31 12:00:17   收藏:0   阅读:154

import java.io.*;

public class Echo {
    public static void main(String[] args)
    throws IOException{
        BufferedReader in=new BufferedReader(
        new InputStreamReader(System.in));
        String s;
        while((s=in.readLine()).length()!=0)
            System.out.println(s);
    }
}
这个书上说输入“Hello”后回车会看到打印结果,可是为什么不能运行呢?
具体该怎么运行呢?
新人求助

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!