Java scanner not going through entire file

后端 未结 8 1096
悲&欢浪女
悲&欢浪女 2020-11-30 11:31

I\'m writing a program in Java and one of the things that I need to do is to create a set of every valid location for a shortest path problem. The locations are defined in a

8条回答
  •  执念已碎
    2020-11-30 12:05

    You should use this :

    Scanner scanner = new Scanner(fileObj).useDelimiter("\z");
    System.out.println(scanner.next());

提交回复
热议问题