Table of Contents
show
Anomalies that occur at runtime are known as exceptions
Exceptions are of two types,
- Synchronous exceptions
- Asynchronous exceptions
Synchronous exceptions
Synchronous exceptions are caused due to mistakes in the logic of the program and can be controlled
Examples
- Divide by zero
- Array index out of bounds
Asynchronous exceptions
 Asynchronous exceptions are caused due to hardware failure or operating system level failures and cannot be controlled
Examples
- Out of memory error
- Memory overflow
- Memory underflow
- Disk failure
Views: 0