Checked Exceptions are the one for which a handling needs to be provided in the application i.e a try catch block is required or a throws clause is required or else the compiler will not allow to compile the file.These are exceptions for which some alternative corrective measure can be taken and the program can continue executing. Example IOException or FileNotFoundException.
Unchecked exceptions are Runtime Exceptions and errors like NullPOinterException and ClassCastException which normally occur due to programming errors and should not happen, if they do it is a bug or a wrong code.These exception need not be catched since they need to be fixed if at all they come up.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment