fork download
  1. class Exc0 extends Exception { }
  2. class Exc1 extends Exc0 { }
  3. class Test
  4. {
  5. public static void main(String args[])
  6. {
  7. try
  8. {
  9. throw new Exc1();
  10. }
  11. catch (Exc0 e0)
  12. {
  13. System.out.println("Ex0 caught");
  14. }
  15. catch (Exception e)
  16. {
  17. System.out.println("exception caught");
  18. }
  19. }
  20. }
Success #stdin #stdout 0.1s 320512KB
stdin
Standard input is empty
stdout
Ex0 caught