Unchecked Exception In Java
Chapter:
Exception Handling
Last Updated:
19-04-2016 13:56:22 UTC
Program:
/* ............... START ............... */
public class JavaUncheckedException {
public static void main(String args[]) {
int a = 0;
int b = 100;
int c = b / a;
}
}
/* ............... END ............... */
Output
Exception in thread "main" java.lang.ArithmeticException: / by zero
at ExceptionHandling.JavaUncheckedException.main(JavaUncheckedException.java:18)
Notes:
-
The exceptions that are not checked at compile time are called unchecked exceptions.
Tags
Unchecked Exception, Java