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 Exception 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 "Exception" Watch "Exception" New topic
Author

Exception

Chetan Dodiya
Ranch Hand

Joined: Jun 27, 2008
Posts: 39
I have one doubt....
try{
----
/* Exception occurs */
----
}
finally{
---
---
}
What if,any of the exceptions occurs in the try block???
catch clause is not there to handle the exception...


SCJP 1.5
Rekha Srinath
Ranch Hand

Joined: Sep 13, 2008
Posts: 178
In case of unchecked exceptions, the finally block will be executed and the exception will be called to the calling method.

In case of checked exceptions, you have to declare the exception in the methods or handle it in any of the functions in the call stack.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Exception
 
Similar Threads
Try Catch Block
valueChangeListener and Exceptions
Newbie ; NullPointerException
JNI UnsatisfiedLinkError only thrown once
can a constructor throw exception?