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

Potential error on page 21 (Sybex)

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
On page 21 of the OCAJP8, it says:

"Table 1.1 shows the Java primitive types together with their size in bytes and the range of value that each holds."

Shouldn't that be "bits" instead of "bytes"?
 
Marshal
Posts: 8831
631
Mac OS X VI Editor BSD Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Since we don't know which book you are talking about, but anyways, if book mentions 'bytes' in that context', sure, there must be 'bits'.
 
Liutauras Vilda
Marshal
Posts: 8831
631
Mac OS X VI Editor BSD Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
And welcome to the Ranch, Eagle Eye Bart Presso
 
Bart Presso
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Liutauras Vilda wrote:Since we don't know which book you are talking about, but anyways, if book mentions 'bytes' in that context', sure, there must be 'bits'.



It's in the OCAJP8 Study Guide by Boyarsky and Selikoff, the book's website (https://www.selikoff.net/java-oca-8-programmer-i-study-guide/) said to post potential errors here :-)
 
Bart Presso
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Liutauras Vilda wrote:And welcome to the Ranch, Eagle Eye Bart Presso



And thank you!
 
Marshal
Posts: 78695
374
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The correct figures are
byte=1, char=2, short=2, int=4, long=8, float=4, double=8, if using bytes.
The correct figures are
byte=8, char=16, short=16, int=32, long=64, float=32, double=64, if using bits.
If using bats, bets, bots, buts or byts, the values are undefined.

[later edit]Yes, that link is the correct place for suspected errors. There are two links on the same website, one for the OCA book and one for the OCP book.
 
Bartender
Posts: 1251
87
Hibernate jQuery Spring MySQL Database Tomcat Server Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Bart Presso wrote:Shouldn't that be "bits" instead of "bytes"?

Just checked in the book, Agreed.
 
author & internet detective
Posts: 41775
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 the errata
 
Well don't expect me to do the dishes! This ad has been cleaned for your convenience:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic