How to read all content by java Scanner?

前端 未结 0 1675
渐次进展
渐次进展 2020-12-07 13:02

This code is wrong:

String result = "";
while (scanner.hasNextLine()) {
    result += scanner.nextLine() + System.lineSeparator();
         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题