File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes problem with 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 "problem with catch and finally" Watch "problem with catch and finally" New topic
Author

problem with catch and finally

Angela lewis
Ranch Hand

Joined: Mar 01, 2004
Posts: 100


If Hello.txt does not exist then the output would be

No such file found
Doing finally
-1

Why isn't it
No such file found
Doing finally
-1

Thanks
Swamy Nathan
Ranch Hand

Joined: May 16, 2004
Posts: 187
Something seems to be wrong with the question (I think)?
Looluo Zhu
Greenhorn

Joined: Nov 26, 2003
Posts: 8
I think the question should be

No such file found
Doing finally
0

Why isn't it
No such file found
Doing finally
-1


and this thread has the answer.


SCJP 1.4
 
jQuery in Action, 2nd edition
 
subject: problem with catch and finally
 
Similar Threads
try catch block
static methods
Exceptions
exCeption
Doubt regarding FileInputStream