OnJava8-Examples/exceptions/MainException.java
2020-10-07 13:35:40 -06:00

18 lines
505 B
Java

// exceptions/MainException.java
// (c)2020 MindView LLC: see Copyright.txt
// We make no guarantees that this code is fit for any purpose.
// Visit http://OnJava8.com for more book information.
import java.util.*;
import java.nio.file.*;
public class MainException {
// Pass exceptions to the console:
public static void
main(String[] args) throws Exception {
// Open the file:
List<String> lines = Files.readAllLines(
Paths.get("MainException.java"));
// Use the file ...
}
}