基础 - 类似while(scanf("%d",&n)!=EOF)形式java中怎么表达?
ringa_lee
ringa_lee 2017-04-17 17:51:13
0
1
785

最近做poj2234,要求从键盘输入下图这样的形式,但是没有结束标志,C语言中可以用EOF表示读取结束,java中该怎么做到呢?

ringa_lee
ringa_lee

ringa_lee

reply all(1)
巴扎黑

you should use while (fileReader.hasNextLine())

Reference http://stackoverflow.com/questions/8270926/while-eof-in-java

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template