• 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
  • Ron McLeod
  • Tim Cooke
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Jeanne Boyarsky
Saloon Keepers:
  • Stephan van Hulst
  • Carey Brown
  • Tim Holloway
  • Piet Souris
Bartenders:

Potential errata in Boyarsky and Selikoff Java SE 8 Programmer I Study Guide Exam

 
Greenhorn
Posts: 27
1
  • Likes 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Of course it is not too important but I think that one more potential errata should be added on the book web-page. It concerns question number 13 of assessment test. Literally the sentence in the book says "Since luck is not less than 10, the second expression,
--luck, will be evaluated, and since the pre-increment operator was used, the value returned will be 9, which is less than 10". But actually as it follows from the text pre-decrement operator is used for variable luck.
 
Vitaliy Ovcharenko
Greenhorn
Posts: 27
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Vitaliy Ovcharenko wrote:Of course it is not too important but I think that one more potential errata should be added on the book web-page. It concerns question number 13 of assessment test. Literally the sentence in the book says "Since luck is not less than 10, the second expression,
--luck, will be evaluated, and since the pre-increment operator was used, the value returned will be 9, which is less than 10". But actually as it follows from the text pre-decrement operator is used for variable luck.


The next sentence "So the first if-then statement will be visited and Bear will be output." also looks little bit confusing because java statement "if" does not have "then" as some another programming languages.
 
author & internet detective
Posts: 41590
883
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

Vitaliy Ovcharenko wrote:--luck, will be evaluated, and since the pre-increment operator was used, the value returned will be 9, which is less than 10". But actually as it follows from the text pre-decrement operator is used for variable luck.


Confirmed and added to the errata page.

Vitaliy Ovcharenko wrote:The next sentence "So the first if-then statement will be visited and Bear will be output." also looks little bit confusing because java statement "if" does not have "then" as some another programming languages.


That's not an errata. People commonly refer to an if statement as an if then statement even though "then" doesn't appear in the syntax of Java. It's understandable both ways.
 
The government thinks you are too stupid to make your own lightbulb choices. But this tiny ad thinks you are smart:
The Low Tech Laboratory Movie Kickstarter is LIVE NOW!
https://www.kickstarter.com/projects/paulwheaton/low-tech
reply
    Bookmark Topic Watch Topic
  • New Topic