The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Nested  try/catch block Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Professional Certification » Programmer Certification (SCJP/OCPJP)
Reply Bookmark "Nested  try/catch block" Watch "Nested  try/catch block" New topic
Author

Nested try/catch block

Sunita Vontel
Ranch Hand

Joined: Aug 28, 2000
Posts: 72
Can somebody explain me the output here.

Thank You
[I added UBB CODE tags to your source code to make it more readable. - Ajith]
[This message has been edited by Ajith Kallambella (edited August 29, 2000).]
Rajesh Gupta
Greenhorn

Joined: Jun 21, 2000
Posts: 20
Simple! exception is caught outside by the first catch statement outside the try catch block.After that finally block is getting executed.
Sunita Vontel
Ranch Hand

Joined: Aug 28, 2000
Posts: 72
Hi Rajesh
Thank you for the reply.
If the inner exception "Ei" was thrown then will the both finally blocks execute??
Thanks
 
 
subject: Nested try/catch block
 
Threads others viewed
nested try catch finally in a for loop : how does it work
Try, Catch & Finalise blocks
try/catch
question on try catch block
try/catch cert guide quiz question???
developer file tools