• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

catch and finally

 
redmouse
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
can finally block substitude catch block? like
try
{}
finally{}
thanks
 
Andy Skalkin
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes it can.
 
Jane Griscti
Ranch Hand
Posts: 3141
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Anshul Manisha
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic