1.

How to read entire file in one line using java 8?(a) Files.readAllLines()(b) Files.read()(c) Files.readFile()(d) Files.lines()

Answer» Correct answer is (a) Files.readAllLines()

The best explanation: Java 8 provides Files.readAllLines() which allows us to read entire file in one task. We do not need to worry about readers and writers.


Discussion

No Comment Found

Related InterviewSolutions