I have a question related to exceptions?I read K&B but still not very clear regarding programatically thrown excetions and exceptions thrown by JVM?Are they even remotely associated to checked and unchecked respectively?Is there any other way to understand them other than learing the names by heart?
If user defined exceptions extend RuntimeException then they become unchecked excpetions or else they become checked exceptions. Because only RuntimeException and its subclasses are unchecked exceptions.
You need to remember exceptions only mentioned in K&B book for the exam. They are easy to remember because by the name of the exception itself we can tell in what situations those exceptions will be thrown.
I also faced the same problem. Programmatically thrown exceptions are the one thrown explicitly from your code. It can be both checked or unchecked as said by Murali.