• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Finally block execution was forgotten in explanation on page 308, in chapter 6 (Java OCA 8)

 
Ranch Hand
Posts: 221
27
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


“The catch block runs and she gets a hug on line 17” – after this step finally block executes, then the try statement is over. Maybe authors forgot to note it because they wrote “Either way, the ending is the same”.
 
Sheriff
Posts: 11604
178
Hibernate jQuery Eclipse IDE Spring MySQL Database AngularJS Tomcat Server Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Mushfiq Mammadov wrote:Maybe authors forgot to note it because they wrote “Either way, the ending is the same”.


True! Probably a first (or second) version of this paragraph was written and then a few changes were made but the paragraph has not been re-read in its entirety. On the positive side: all required info mentioned in the paragraph is correct, it only needs some rephrasing.

Off-topic: it's really a great example to illustrate how finally works. A real-world example completely unrelated with software development I wonder why the girl gets a hug from daddy and not from mommy
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I've added this to my list of things that aren't wrong, but could be clearer. (This is a private list for Scott and I in a private github repository).

Roel De Nijs wrote:Off-topic: it's really a great example to illustrate how finally works. A real-world example completely unrelated with software development


Thanks!

Roel De Nijs wrote:I wonder why the girl gets a hug from daddy and not from mommy


Clearly because daddy took her to the zoo!
reply
    Bookmark Topic Watch Topic
  • New Topic