I need to read a large text file of around 5-6 GB line by line using Java.
How can I do this quickly?
try (Stream stream = Files.lines(Paths.get(fileName))) { stream.forEach(System.out::println); }