File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Mock Exam Errata and the fly likes Ambiguous Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Professional Certification » Mock Exam Errata
Reply Bookmark "Ambiguous "finally" question" Watch "Ambiguous "finally" question" New topic
Author

Ambiguous "finally" question

Rick O'Shay
Ranch Hand

Joined: Sep 19, 2004
Posts: 531
Q. If an exception is not caught finally is run and the rest of the method is skipped.

There are two interpretations of "not caught" so I would rephrase this as "If an exception is thrown and not caught" just to be clear. The other interpretation of "not caught" is not supplying a catch clause.
Jim Yingst
Wanderer
Sheriff

Joined: Jan 30, 2000
Posts: 18652
Agreed.

Was this from a particular mock exam somewhere?


"I'm not back." - Bill Harding, Twister
Stuart Gray
Ranch Hand

Joined: Apr 21, 2005
Posts: 410
Isn't finally always run, even if an exception is not thrown? This makes the question even less clear IMHO.
 
 
subject: Ambiguous "finally" question
 
Threads others viewed
Exceptions
NullPointerException problem
doubts on try and finally block
Exceptions.Any help.
on finally
WebSphere development made easy
without the weight of IBM tools
http://www.myeclipseide.com

cast iron skillet 49er

more from paul wheaton's glorious empire of web junk: cast iron skillet diatomaceous earth rocket mass heater sepp holzer raised garden beds raising chickens lawn care CFL flea control missoula heat permaculture