class ExceptionTest { public static void main(String[] args) { double resultat = 0; try { resultat = del(10, 0); } catch (DelPaaNullException e) { System.out.println(e); } System.out.println(resultat); } public static double del( double teller, double nevner ) throws DelPaaNullException { if (nevner == 0) { throw new DelPaaNullException(teller, nevner); } return teller/nevner; } }