• 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:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

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

 
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
Sheriff
Posts: 38571
661
Eclipse IDE Java VI Editor
  • 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.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!