UNB/ CS/ David Bremner/ teaching/ old/ cs1083/ java/ Catch2.java
public class Catch2{
    public static void a(){
        throw new RuntimeException("Thrown");  }
    public static void b(){
        try { a(); }
        catch (ImageFormatException e){
            System.out.println(e.getMessage());
        } }
    public static void main(String[] args){
        try{  b(); }
        catch (RuntimeException e){
            System.out.println("Caught");
        }  }
}