This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Ambiguous "finally" question
 
Similar Threads
Exceptions
NullPointerException problem
Exceptions.Any help.
doubts on try and finally block