You are here: Home / Topics / Stack trace of default Exception Handler of JVM

Stack trace of default Exception Handler of JVM

Filed under: Java

// Program without Exception Handling and 
// stack trace of Default Handler of JVM.

class  DefaultException2 
{
static void subroutine() 
{
 int d = 0;
 int a = 10 / d;
}

public static void main(String args[ ]) 
{
 Exception02.subroutine();
}
}


Output:

Exception in thread "main" java.lang.ArithmeticException 
 at DefaultException2.subroutine(DefaultException2.java:6)
 at DefaultException2.main(DefaultException2.java:11)

Categories