Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
  • 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
  • Liutauras Vilda
  • Bear Bibeault
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Junilu Lacar
  • Paul Clapham
  • Knute Snortum
Saloon Keepers:
  • Stephan van Hulst
  • Ron McLeod
  • Tim Moores
  • salvin francis
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • 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
Posts: 39200
725
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.
 
Been there. Done that. Went back for more. But this time, I took this tiny ad with me:
global solutions you can do at home or in your backyard
https://www.kickstarter.com/projects/paulwheaton/better-world-boo
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!