+ 1
What is the difference between checked exception and unchecked exception.
an example program might help me understand this better.
1 Respuesta
+ 2
checked exceptions must be handled in your code. unchecked exceptions (also called runtime exceptions) can be thrown by your program without having the compiler complaining. NullPointerException is runtime exception, it can be thrown inexpectedly.
IOException, SQLException are checked exceptions so your program needs to handle those (catch or at least declare in method signature)