package exceptions; public class TestException3 { static double testException(int x, int y) { return (x/y); } public static void main(String[] args) { try { double p = testException(10,0); System.out.println("p = "+p); } catch(Exception e) { System.out.println("Exception happened "+e.getMessage()); System.exit(0); } finally { System.out.println("In finally"); } } }