What is the difference between Errors and Exceptions in Java?
Errors | Exceptions |
---|---|
The type of error in Java is Java. Lang.Error. | The type of exception in Java is Java. Lang.Exception. |
The type of all the errors in Java is unchecked. | Exceptions include both checked and unchecked types. |
It is impossible to recover from errors. | You can recover from exceptions by handling them via try-catch blocks. |
The reason for causing the errors are the environment where the application is running. | The application itself causes exceptions. |
BY Best Interview Question ON 03 May 2022