• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Mushfiq Mammadov
Ranch Hand
Posts: 187
25
Java jQuery Netbeans IDE
  • Mark post as helpful
  • send pies
  • 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”.
 
Roel De Nijs
Sheriff
Posts: 10662
144
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • 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
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 35279
384
Eclipse IDE Java VI Editor
  • Likes 1
  • Mark post as helpful
  • send pies
  • 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!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic