• 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
  • Devaka Cooray
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Jeanne Boyarsky
  • Tim Cooke
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Mikalai Zaikin
  • Carey Brown
Bartenders:

Mock explanations #17 of chapter 2, on page 338 (Java OCA 8 Programmer I Study Guide)

 
Ranch Hand
Posts: 221
27
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
My English is not good enough, maybe I understand anything wrongly, I apologize for that in advance.

On page 338, the answer #17, third sentence:

“Since i is not 8, keepGoing is false, and the loop continues.”


Underlined expression should be:
“keepGoing is true” or “keepGoing is not false”.

P.S. On errata page:
1. Minor Typos, #17: “page 106” should be “page 107”
2. Typos in mock explanations, #3: “page 334” should be “page 335”
 
Sheriff
Posts: 11604
178
Hibernate jQuery Eclipse IDE Spring MySQL Database AngularJS Tomcat Server Chrome Java
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Mushfiq Mammadov wrote:On page 338, the answer #17, third sentence:

“Since i is not 8, keepGoing is false, and the loop continues.”


Underlined expression should be:
“keepGoing is true” or “keepGoing is not false”.


Nothing wrong with your English Just a typo. Or maybe the sentence was 1st a negation and then it was negated (because positive statements are easier to comprehend), but the author forgot to negate the boolean as well.

Only if i is equal to 8, keepGoing will be set to false. In the 1st iteration, i is 9, so keepGoing is not set to false (and thus still true).

Hope it helps!
Kind regards,
Roel
 
author & internet detective
Posts: 41763
887
Eclipse IDE VI Editor Java
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Noted both the negation and the two errata corrections.

Mushfiq Mammadov wrote:My English is not good enough, maybe I understand anything wrongly,


You didn't understand wrong. But this reminds me of something - if you come across a phrase in the book that is confusing to a non-native English speaker, please do let me know. Even if it isn't wrong, some phrasings are awkward.
 
Mushfiq Mammadov
Ranch Hand
Posts: 221
27
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Roel De Nijs wrote:Nothing wrong with your English Just a typo. Or maybe the sentence was 1st a negation and then it was negated (because positive statements are easier to comprehend), but the author forgot to negate the boolean as well.


Thanks, Roel

Jeanne Boyarsky wrote:You didn't understand wrong. But this reminds me of something - if you come across a phrase in the book that is confusing to a non-native English speaker, please do let me know. Even if it isn't wrong, some phrasings are awkward.


Ok, Jeanne. I will inform you if I come across confusing phrase. Thanks
 
Did Steve tell you that? Fuh - Steve. Just look at this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic