What is the most preferred and concise way to print all the lines in a file using the new Java 8?
The output must be a copy of the file, line for line as in:
Here is a simple solution:
System.out.println( new String(Files.readAllBytes(Paths.get("sample.java"))) );