Checked exceptions are checked at compile time and usually indicate syntax errors, missing libraries, and other structural problems. Unchecked errors are thrown at runtime and typically indicate logic errors, like getting a null value when there should not be one. Hence a NullPointerException would be thrown. http://java.sun.com/docs/books/tutorial/essential/exceptions/runtime.html
Checked exceptions are also thrown at runtime, of course. If an exception is checked that just means that any piece of the code that might throw a checked exception has either a throws in the methods signature or a try/catch around it. Take FileReader for example, the compiler does not check if the file exists(which would be pointless and impossible to check anyway), but makes sure that there is code in place to handle that possibility.
Given that, it is a mystery to me why NumberFormatException isn't checked. Anything that accepts input from an outside source(network, keyboard, file, ect) should be forced to check for error conditions, IMO. and methods that throw NumberFormatException might not directly take input from outside the program, but that is pretty much the only time they are called. [ October 12, 2006: Message edited by: Robert Hill ]
Only the Error and RuntimeException and all of it's subclasses are unchecked exceptions. The NumberFormatException is subclassed from the RuntimeException and therfore it's an unchecked exception. Don't ask why the boys of Sun have put it in there. Also don't ask why NullPointerException is an unchecked exception
All subclasses of Exception, other than RuntimeException, are checked Exceptions. You indeed have to catch them in a try-catch-finally block, or if you don't want to catch them, you have to put it in the throws clause of the corresponding method. [ October 12, 2006: Message edited by: Bauke Scholtz ]