aspose file tools*
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
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: 18671
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.
 
Consider Paul's rocket mass heater.
 
subject: Ambiguous "finally" question