Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Checked,Unchecked Expception

 
Lucky J Verma
Ranch Hand
Posts: 278
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I read it in a book ,that we need not to worry about Unchecked exceptions ,as JVM can handle it ,if we dont.
But Checked ,we must do .
But in most of the books ,tutorials ,net-lessons , i see ,all examples they take is of -Unchecked category .Even Creating User Defined excpetions from Unchecked. eg ArithmeticException .

Whats the trick .Is it because of easy & standard exceptions.Can we use all the excpetions in same way & extend all the excpetions.

thnx
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When to use checked and unchecked has many answers. Sun had one in mind when they made checked exceptions, and one option is to follow their lead. Some folks think Sun blew it, and have other ideas. Thinking In Java has a good chapter on the subject that presents both points of view. Take the time to read chapter 9 (free, online) and let us know what you think.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic