Posted On: Dec 23, 2020
Whenever an exception is generated in Java it is either type of a checked or unchecked exception. Below are the few differences between checked and unchecked exceptions in Java.
Checked Exception | Unchecked Exception |
---|---|
Checked exceptions are checked at compile-time. | Unchecked exceptions are not checked at compile time |
Interrupted Exception, file not found, Class Not Found are few Checked exceptions. | Empty Stack Exception, Arithmetic Exception, Null Pointer Exception, Array Index Out of Bounds Exception are few Unchecked exceptions |
Never Miss an Articles from us.
There are basically four types of storage classes in Java:Automatic storage class: When a variable that is used in the coding is defined within a function and that also with the auto specifier the...
A JAVA program to generate Fibonacci series is as follows: import java.util.Scanner; public class Fibonacci { public static void main(String[] args) { int n, a = 0, b = 0, c = ...
Garbage collection is the process of automatically managing memory in java. It is helpful to finds the unused objects that are no longer used by the program and deletes or remove them to free up the m...