OnJava8-Examples/exceptions/MainException.java

15 lines
358 B
Java
Raw Normal View History

2015-04-20 15:36:01 -07:00
//: exceptions/MainException.java
import java.io.*;
public class MainException {
// Pass all exceptions to the console:
public static void main(String[] args) throws Exception {
// Open the file:
FileInputStream file =
new FileInputStream("MainException.java");
// Use the file ...
// Close the file:
file.close();
}
} ///:~