File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes Can i use 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 » Java » Beginning Java
Bookmark "Can i use "finally" withouy try-catch?" Watch "Can i use "finally" withouy try-catch?" New topic
Author

Can i use "finally" withouy try-catch?

samir vasani
Ranch Hand

Joined: Nov 24, 2010
Posts: 59
Hi all,

My question is can i use finally without try and catch?
And if yes then in cases i can use.
Eleborate with an example
Joanne Neal
Rancher

Joined: Aug 05, 2005
Posts: 3167
    
  10
You can use finally without a catch but you have to have the try.


Joanne
Wouter Oet
Saloon Keeper

Joined: Oct 25, 2008
Posts: 2700

Why don't you try it? That is the easiest way to find out and you'll learn more from it then asking us.


"Any fool can write code that a computer can understand. Good programmers write code that humans can understand." --- Martin Fowler
Please correct my English.
Arun Giridharan
Ranch Hand

Joined: Sep 30, 2010
Posts: 290

Wouter Oet wrote:Why don't you try it? That is the easiest way to find out and you'll learn more from it then asking us.

You said it .
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Can i use "finally" withouy try-catch?
 
Similar Threads
finally block
catch
Exception Handling in Main
a try need atleast 1 catch or 1 finally - right ?
Read input from user until an input is valid