I\'m currently trying to read lines from a text only file that I have. I found on another stackoverflow(Reading a plain text file in Java) that you can use Files.lines(..).f
With Java 8, if file exists in a classpath:
classpath
Files.lines(Paths.get(ClassLoader.getSystemResource("input.txt") .toURI())).forEach(System.out::println);