• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

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
  • 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
  • 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: 39997
807
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
  • 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.
 
Can you really tell me that we aren't dealing with suspicious baked goods? And then there is this tiny ad:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic