diff --git a/Exceptionhandling.java b/Exceptionhandling.java new file mode 100644 index 0000000..6043aab --- /dev/null +++ b/Exceptionhandling.java @@ -0,0 +1,15 @@ +class Main { + public static void main(String[] args) { + + try { + + + int divideByZero = 5 / 0; + System.out.println("Rest of code in try block"); + } + + catch (ArithmeticException e) { + System.out.println("ArithmeticException => " + e.getMessage()); + } + } +}