Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

creating our own unchecked Exceptions  RSS feed

 
Raj Kumar Bindal
Ranch Hand
Posts: 418
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 21047
85
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Extend RuntimeException or a subclass of RuntimeException, instead of Exception or a subclass of Exception.
 
Raj Kumar Bindal
Ranch Hand
Posts: 418
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!