File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Java in General and the fly likes Checked to Unchecked Exception Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Checked to Unchecked Exception" Watch "Checked to Unchecked Exception" New topic

Checked to Unchecked Exception

Xon Bhuyan

Joined: Sep 24, 2003
Posts: 11
I read somewhere like :
"If a checked exception doesn�t make sense to you do not hesitate to convert it into unchecked exception ....."

How do you convert a checked exception, say IOException into unchecked Exception ?

Xon Bhuyan
Srinivasa Raghavan
Ranch Hand

Joined: Sep 28, 2004
Posts: 1228
I guess that line was ment for custom exception classes.
To create a unchecked exception a class should inherit RuntimeException.

Thanks & regards, Srini
MCP, SCJP-1.4, NCFM (Financial Markets), Oracle 9i - SQL ( 1Z0-007 ), ITIL Certified
Stefan Willi
Ranch Hand

Joined: Mar 11, 2005
Posts: 47

Xon Bhuyan

Joined: Sep 24, 2003
Posts: 11
Thanks Stefan
I agree. Here's the link:
subject: Checked to Unchecked Exception
Similar Threads
Dan's mock question
Exception Doubt
Checked and Unchecked Exceptions