package ocjp;
public class Test {
public static void main(String[] args) {
Test p = new Test();
try {
p.doPrint();
p.doList();
} catch (Exception e) {
System.out.println("Caught: "+e);
}
}
public void doList() throws Exception{
throw new Error("error");
}
public void doPrint()throws Exception{
throw new RuntimeException("RuntimeException");
}
}