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

Stack trace of default Exception Handler of JVM

Filed under: Java on 2023-09-19 06:44:23

// 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)

About Author:
M
Mr. Dubey     View Profile
Founder and CEO of MCQ Buddy. I just like to help others.