What is Exception? Write its types.
Answers
Answered by
1
What is exception?
An exception is an event, which occurs during the execution of a program, which disrupts the normal flow of the program's instructions.
Types of exception
There are three types of exception
1. Run Time Exception or Unchecked Exception
2. Compile Time Exception or checked Exception
3. Error
Hope it helps you
An exception is an event, which occurs during the execution of a program, which disrupts the normal flow of the program's instructions.
Types of exception
There are three types of exception
1. Run Time Exception or Unchecked Exception
2. Compile Time Exception or checked Exception
3. Error
Hope it helps you
Answered by
0
Exceptions arises when there is an unexpected line that is encountered by the compiler or interpreter which disturbs the normal flow of the program. If it is caught it will throw an exception message and stops the program smoothly. If not, it will end the program ubruptly.
There are 3 types of exception: error, checked exception and unchecked exception.
Error: This would irrecoverable
Checked exception: Other than run-time errors
Unchecked exceptions: Run-time error
Similar questions