Win a copy of Bad Programming Practices 101 (e-book) this week in the Beginning Java forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

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
Marshal
Posts: 38366
645
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.
 
Everybody's invited. Even this tiny ad:
Why should you try IntelliJ IDEA ?
https://coderanch.com/wiki/696337/IntelliJ-IDEA
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!