This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Why can't we write throw new Exception(); without try catch block ?

 
devasis majhi
Greenhorn
Posts: 9
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When we can write throw new ArithmeticException(); without a try catch block why can't we write throw new Exception(); without try catch block.
To generalize we can throw a RuntimeException without try catch block but we can't throw a checked Exception without try catch block. What is the reason behind it?
 
Campbell Ritchie
Sheriff
Pie
Posts: 47258
52
  • 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you know the essential difference between an Exception and a RuntimeException? Have a look at the Java Tutorials, which explains it.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic