aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes catch and finally 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 "catch and finally" Watch "catch and finally" New topic
Author

catch and finally

redmouse
Greenhorn

Joined: Jun 30, 2001
Posts: 1
can finally block substitude catch block? like
try
{}
finally{}
thanks
Andy Skalkin
Ranch Hand

Joined: Apr 05, 2001
Posts: 33
Yes it can.
Jane Griscti
Ranch Hand

Joined: Aug 30, 2000
Posts: 3141
Hi redmouse,
Please read the JavaRanch Name Policy and re-register using a name that complies with the rules.
Thanks for your cooperation.
------------------
Jane Griscti
Sun Certified Programmer for the Java� 2 Platform


Jane Griscti
SCJP, Co-author Mike Meyers' Java 2 Certification Passport
Anshul Manisha
Ranch Hand

Joined: Apr 17, 2001
Posts: 74
Yes it can but if the code in the try block is throwing any checked exception it must have a catch block or must be declared in the method.
Originally posted by redmouse:
can finally block substitude catch block? like
try
{}
finally{}
thanks


AM<BR> <A HREF="mailto:anshulmohan@rediffmail.com" rel="nofollow">anshulmohan@rediffmail.com</A>
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: catch and finally