What is an exception?
An exception occurs because of some mistake in
program that system cannot detect before executing the code as there is nothing
wrong in terms of syntax, but leads to a situation during the program execution
that system cannot handle. These errors disrupt the flow of program at run-time
by terminating the execution at the point of occurrence of error.