This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Beginning Java and the fly likes creating our own unchecked Exceptions Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "creating our own unchecked Exceptions" Watch "creating our own unchecked Exceptions" New topic
Author

creating our own unchecked Exceptions

Raj Kumar Bindal
Ranch Hand

Joined: Apr 15, 2006
Posts: 418
When we create user defined exceptions,those are checked exceptions.Is there any way through which we can create user defined unchecked exceptions.
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19679
    
  18

Extend RuntimeException or a subclass of RuntimeException, instead of Exception or a subclass of Exception.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Raj Kumar Bindal
Ranch Hand

Joined: Apr 15, 2006
Posts: 418
Thanks Rob.but i don't see any usage of making user defined unchecked exceptions.Can you tell me some scenario where user defined unchecked exceptions are helpful.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: creating our own unchecked Exceptions