Hi Ranchers, I am so confused with the Exception types. Can someone help me. Are JVM Exceptions Checked Exceptions?? and Programatically Thrown Exceptions Unchecked ???
In K&B there is a table with a list of JVM and Program Exceptions. but why not a table for Checked and Unchecked Exceptions(thought not all can be listed but some bsic ones)?? Are JVM and Programatically thrown Exceptions different from Checked and Unchecked??
I have my exam scheduled day after. So any help is really apprecited. Thank You
If you worry you cannot work... If you work you need not worry
The second are the ones which are related to some kind of resources used by the program like Files or Network connections. These connections are not in the control of the programmer but they are checked so that you could take some action when they occur.
The third are the one that are internal in the JVM. They are caused by some problem during the execution of the program. The are suffixed with Error instead of Exception. They are unchecked as you cannot do anything when they occur...examples are StackOverflowError, OutOfMemoryError etc..
Checked exceptions are subclasses of Exception class, JVM exceptions are subclasses of RuntimeException class. I guess when you receive a JVM exception it will be occuring at runtime. So NullPointerException, ArrayIndexOutOfBoundException etc are unchecked JVM exceptions.
I think that JVM Exceptions is a confusing term. All the exceptions are thrown by the JVM. Programmatic exceptions are explicitly thrown using throw. Other exceptions are thrown at runtime automatically...
No man....I am stuck heavily with Generics. I don't know why it doesn't seem to get into my mind...I am a Java EE developer. So usually I get very little time to study. Maybe that's the reason why I am not able to understand generics because I have not written too much of code for that....