// : c09:MainException.java
// From 'Thinking in Java, 3rd ed.' (c) Bruce Eckel 2002
// www.BruceEckel.com. See copyright notice in CopyRight.txt.
import java.io.FileInputStream;
publicclass MainException {
// Pass all exceptions to the console:
publicstaticvoid main(String[] args) throws Exception {
// Open the file:
FileInputStream file = new FileInputStream("MainException.java");
// Use the file ...
// Close the file:
file.close();
}
} ///:~