File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Mock Exam Errata and the fly likes Ambiguous Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Mock Exam Errata
Bookmark "Ambiguous "finally" question" Watch "Ambiguous "finally" question" New topic

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

Joined: Jan 30, 2000
Posts: 18671

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.
I agree. Here's the link:
subject: Ambiguous "finally" question
It's not a secret anymore!