• 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:

Sybex Java OCA 8 Online Bonus Test Typo Question 131 of 180

 
Ranch Hand
Posts: 215
11
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sybex Java OCA 8 Online Bonus Test Typo Question 131 of 180 Explanation

"Finally we perform modular arithmetic using the new values of x and y—9 and 5, respectively. If we divide
these two values we get 0; therefore, the remainder of 9 % 5 is 4; so option A is the correct answer."

It should be "If we divide these two values we get 1."   9/5 in java is 1 not 0.


by alinvlad05

 
author & internet detective
Posts: 41763
887
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Confirmed and added to this book's errata and the Java 11 book's errata. This question was not used in the Java 17 book.
 
For my next feat, I will require a volunteer from the audience! Perhaps 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