diff --git a/heap/exceptionn.java b/heap/exceptionn.java new file mode 100644 index 0000000..08def40 --- /dev/null +++ b/heap/exceptionn.java @@ -0,0 +1,14 @@ +import java.io.*; + +class GFG { + public static void main (String[] args) { + int a=5; + int b=0; + try{ + System.out.println(a/b); + } + catch(ArithmeticException e){ + e.printStackTrace(); + } + } +}