java has two type of exception, one is checked exception and another is unchecked exception.
checked exception inherit from the java.lang.Exception and unchecked exception inherit from java.lang.RuntimeException.
checked exception must catch or throw while unchecked exceptin no need.
Below code will throw an unchecked exception:
java.lang.ArithmeticExceptionpublic static void main(String[] args) { int result = 1/0; }