/* TestException4.java CIS 160 David Klick 2005-06-01 This program will compile. When the exception is generated, it will be caught and a message displayed (the stack trace). */ public class TestException4 { public static void main(String[] args) { try { causeException1(); } catch (MyException e) { System.out.println("Error: " + e + " thrown"); e.printStackTrace(); } } static void causeException1() throws MyException { throw new MyException(); } } class MyException extends Exception {}