This week's giveaway is in the EJB and other Java EE Technologies forum. We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line! See this thread for details.
Right, because, sometimes the file your using may not present or mistakenly deleted , so it always safe to confirm whether a file is present or not , Hence compiler forced us to handle it ( called checked exception )
The previous poster sort-of explained it, but without giving the background.
In general RuntimeException is for non-fatal[*] conditions that generally indicate a programming bug. For instance, dereferencing null reference, reading off the end of an array etc.
Checked Exceptions are for conditions that generally represent a problem with data or with the underlying system. For instance, a required disk file is not found (FileNotFoundException). Such conditions are typically not the direct result of a programming bug.
NumberFormatException is difficult to categorise, as it depends where the string being parsed comes from. If it comes directly from user input, a checked exception might be appropriate. If it was obtained programmatically, a RuntimeException might be appropriate. The Java designers picked a RuntimeException.
Don't lose sleep over it.
Betty Rubble? Well, I would go with Betty... but I'd be thinking of Wilma.