Hi friends
I want to know that can we have more than one try with single catch block in java. Please explain it with example.
Thank you.
More Than One Try With Single Catch Block in Java
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.


Satyapriya NayakRank #47 · 31.5K reputationPosted May 5, 2012, 1:48 AM EDT
Please refer the below links
http://www.exampledepot.com/egs/Java%20Language/TryCatch.html
http://www.javamex.com/tutorials/exceptions/exceptions_try_catch_block.shtml
http://www.java-samples.com/showtutorial.php?tutorialid=293
Thanks
VulpesRank #55 · 29.2K reputationPosted May 5, 2012, 2:27 AM EDT
Consequently, you can't insert another try block before the catch block.
However, there's nothing to stop you nesting another try/catch statement within a try block. There's an example of this here:
http://www.roseindia.net/java/exceptions/nested-try.shtml