• 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: 20892
81
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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!