What are the Runtime exceptions and what are Checked/Unchecked Exceptions and difference between Error/Exception.Why these many types? Instead Java may simply follow a simpl
Exceptions are two types in java:
1. **Checked Exception: The exceptions which are checked by compiler.
For example: we you are performing operation with file, then compiler will ask you to handle IOException either by try-catch block or throws keyword.
2. Unchecked Exception: The exceptions which are not checked by compiler at run time.
For example: If you are performing operation on an object without creating it; in this case you'll get NullPointerException.