扫码关注官方订阅号
最近做poj2234,要求从键盘输入下图这样的形式,但是没有结束标志,C语言中可以用EOF表示读取结束,java中该怎么做到呢?
ringa_lee
you should use while (fileReader.hasNextLine())
(fileReader.hasNextLine())
参考 http://stackoverflow.com/questions/8270926/while-eof-in-java
微信扫码关注PHP中文网服务号
QQ扫码加入技术交流群
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
PHP学习
技术支持
返回顶部
you should use while
(fileReader.hasNextLine())参考 http://stackoverflow.com/questions/8270926/while-eof-in-java