• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • Devaka Cooray
Saloon Keepers:
  • Ganesh Patekar
  • Tim Moores
  • Carey Brown
  • Stephan van Hulst
  • salvin francis
Bartenders:
  • Ron McLeod
  • Frits Walraven
  • Pete Letkeman

Potential error on page 21 (Sybex)  RSS feed

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • 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: 6098
418
BSD
  • Mark post as helpful
  • send pies
  • 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: 6098
418
BSD
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • Quote
  • Report post to moderator

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



And thank you!
 
Marshal
Posts: 60776
189
  • Mark post as helpful
  • send pies
  • 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.
 
Saloon Keeper
Posts: 1108
61
Eclipse IDE Hibernate jQuery MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • 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
Marshal
Posts: 38659
677
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Confirmed and added to the errata
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!