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

Exception

 
Nikhil Jain
Ranch Hand
Posts: 389
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Friends,

As we know that the unchecked exceptions are not required to be declared. So is it necessary to learn the list of unchecked exceptions the java provides.

Thanks
Shashank
 
Balazs Borbely
Ranch Hand
Posts: 33
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you don't know the list of unchecked exceptions then you cannot tell if the code compiles.

i.e.
Will the following code compile?

Case 1



Case 2


[ July 02, 2005: Message edited by: Balazs Borbely ]
 
Roger Chung-Wee
Ranch Hand
Posts: 1683
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nobody is expecting you to know all the unchecked exceptions. I don't know which ones you need to know for the exam, but here's a list of the more common ones.

Error
RuntimeException
ArithmeticException
ClassCastException
IllegalArgumentException
IndexOutOfBoundsException
ArrayIndexOutOfBoundsException
NullPointerException
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic