Can someone please tell me what the difference between checked and unchecked exceptions really is? How exactly do i know if the exception is checked or unchecked? Do i need to know all the exceptions that extend RuntimeException for know this?
As far as i know... most exceptions that we would deal with would be checked exceptions. Only exceptions like NullPointerException and OutOfMemoryException would be runtime exceptions that could be termed as unchecked exceptions. Someone please correct me if i'm wrong... Also please elaborate on this as i believe there has to be a simpler way to know a checked exception from an unchecked one.
Most exceptions in java are runtime exception (unchecked exception). java.io exceptions , ClassNotFoundException are checked exceptions. See Khalid Mughal page 186. Pankaj Shinde