19 lines
550 B
Java
19 lines
550 B
Java
// exceptions/MainException.java
|
|
// ©2016 MindView LLC: see Copyright.txt
|
|
// We make no guarantees that this code is fit for any purpose.
|
|
// Visit http://mindviewinc.com/Books/OnJava/ for more book information.
|
|
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();
|
|
}
|
|
}
|
|
/* Output: (None) */
|