• 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
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

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

 
Ranch Hand
Posts: 133
6
  • 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: 41093
848
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.
 
There is no greater crime than stealing somebody's best friend. I miss you tiny ad:
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic