Way2Java

Java All Exceptions Tutorial

1. Exceptions – Meaning
2. Runtime Error – Groups – Exception causes
3. Exception Handling: try – catch
4. try – catch – finally
5. Hierarchy of Exceptions – Checked/Unchecked Exceptions
6. Throwing with "throws" – Alternative to try-catch
7. Creating User-defined Exceptions – throw Keyword
8. getMessage() & printStackTrace()
9. Try – Finally (without Catch)
10. Rules of Exceptions in Method Overriding

Some commonly occurring exceptions, elaborately discussed.

NumberFormatException NoSuchMethodError
ClassNotFoundException IllegalArgumentException
MalformedURLException UnknownHostException
IllegalThreadStateException ClassCastException
RuntimeException IndexOutOfBoundsException
FileNotFoundException & IOException InterruptedException