• 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

The for-each Statement topic, minor typo on page 86 (Java OCA 8 Programmer I Study Guide)

 
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
Hi,

On page 86, the second output is:

Therefore the body of the second for statement:

should be:

Then I look at errata page so this minor typo is noted there or not. And I saw it:

12. page 86 – Chapter 2 – Figure 2.5 says “semicolon” rather than “colon” when pointing to a colon. Reported by Dan.


But I don’t understand it because I don’t find this typo on page 86. The Figure 2.5 is on page 77 and there is no “semicolon” or “colon” in it. Then I look at other figures and saw “semicolon” typo on page 83, figure 2.8
This case is unclear for me. Please explain

Sorry if I am wrong. Thanks in advance
 
Sheriff
Posts: 11604
178
Hibernate jQuery Eclipse IDE Spring MySQL Database AngularJS Tomcat Server Chrome 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 done some research. Here are the results!

Mushfiq Mammadov wrote:should be:


I agree with you on this one: the print statement should be adjusted to your proposal in order to get the output -5, 10,

Mushfiq Mammadov wrote:

12. page 86 – Chapter 2 – Figure 2.5 says “semicolon” rather than “colon” when pointing to a colon. Reported by Dan.


But I don’t understand it because I don’t find this typo on page 86. The Figure 2.5 is on page 77 and there is no “semicolon” or “colon” in it. Then I look at other figures and saw “semicolon” typo on page 83, figure 2.8
This case is unclear for me. Please explain


Probably an errata item of the errata overview In the figure 2.8 "The structure of an enhancement for statement" (on page 83) a colon is used (because that's the correct syntax for this loop), but the label says "semicolon" (probably a left-over from the "regular" for loop)

Mushfiq Mammadov wrote:Sorry if I am wrong.


No need to be sorry, you're spot-on on both occasions!

Hope it helps!
Kind regards,
Roel
 
Roel De Nijs
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

Roel De Nijs wrote:In the figure 2.8 "The structure of an enhancement for statement" (on page 83)


And I'll add another minor type myself. The label of this figure should probably be "The structure of an enhanced for statement" (because it sounds much better and this loop variant is known as the "enhanced for loop (statement)"
 
Mushfiq Mammadov
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
Thanks for your quick answer, Roel
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Roel De Nijs wrote:
Probably an errata item of the errata overview In the figure 2.8 "The structure of an enhancement for statement" (on page 83) a colon is used (because that's the correct syntax for this loop), but the label says "semicolon" (probably a left-over from the "regular" for loop)Roel


Heh. I see how that happened. I got this particular error report verbally. When I was typing it in< I was touch typing using the number pad but not well. All of my digits were one key off. Got to proofread the errata!

Mushfiq Mammadov wrote:


Agreed.

Roel De Nijs wrote:

Roel De Nijs wrote:In the figure 2.8 "The structure of an enhancement for statement" (on page 83)


And I'll add another minor type myself. The label of this figure should probably be "The structure of an enhanced for statement" (because it sounds much better and this loop variant is known as the "enhanced for loop (statement)"


Agreed.

Updated the errata list. Thanks guys.
 
Roel De Nijs
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

Jeanne Boyarsky wrote:Updated the errata list. Thanks guys.


Yay! I'm on the errata list
 
Mushfiq Mammadov
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
I find another minor typo, but it is a bit different other typos, not related to the book My name is written incorrect on the errata page (7 and 13), should be "Mushfiq"
 
Jeanne Boyarsky
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Mushfiq Mammadov wrote:I find another minor typo, but it is a bit different other typos, not related to the book My name is written incorrect on the errata page (7 and 13), should be "Mushfiq"


Fixed. Sorry about that. To be fair that wasn't a typo. You are the first person I "know" with the name Mushfiq so I read/remembered it wrong. Which means I've learned a new name .
 
Mushfiq Mammadov
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

Jeanne Boyarsky wrote:Fixed. Sorry about that. To be fair that wasn't a typo. You are the first person I "know" with the name Mushfiq so I read/remembered it wrong. Which means I've learned a new name .


I say "typo" so my name was correctly written twice on the errata page ago, sorry In our native language (Azerbaijani language) my name is "Müşfiq". The substitute of "ş" is "sh" in English. This name is rarely used in your country, so it is normal to remember it wrong
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic