// Java class Problem extends Exception{ Problem(){super();} Problem(String s) {super(s);} } public class CatchOrSpecifyDemo2 { public static void main(String[] args) throws Problem { explosion(); } static void explosion() throws Problem{ System.out.println("Explosion!"); throw new Problem("We have an explosive problem"); } }