aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Exception Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Exception" Watch "Exception" New topic
Author

Exception

Nikhil Jain
Ranch Hand

Joined: May 15, 2005
Posts: 385
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


SCJP 1.4, SCWCD 1.4, SCBCD 1.5
Balazs Borbely
Ranch Hand

Joined: Oct 11, 2004
Posts: 33
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 ]

'Make everything as simple as possible, but not simpler.' --Albert Einstein
Roger Chung-Wee
Ranch Hand

Joined: Sep 29, 2002
Posts: 1683
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


SCJP 1.4, SCWCD 1.3, SCBCD 1.3
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Exception