This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes reg. super class exceptions Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "reg. super class exceptions" Watch "reg. super class exceptions" New topic

reg. super class exceptions

sanjay kumar

Joined: Aug 29, 2006
Posts: 2
"cannot catch an exception unless it is thrown in try block"



//gives compiler error.
but you can catch a super class exception which is not thrown in try block.

// no compiler error
what are all the super class exceptions?
whether i should know all the exceptions for the exam (1.4)
Aniket Patil
Ranch Hand

Joined: May 02, 2006
Posts: 218
What can you catch when try block does not throw exception?
[ September 17, 2006: Message edited by: Aniket Patil ]

SCJP 5.0 | SCWCD 1.4 <br /> <br />If you don't know where you are going, any road will take you there!
I agree. Here's the link:
subject: reg. super class exceptions
Similar Threads
Exception Handling
true or false?
Throwing exception in overriding methods
ParseException vs Exception
Regarding try / catch block in Exception