• 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
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

Potential error on page 21 (Sybex)

 
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"?
 
Sheriff
Posts: 7616
522
Mac OS X VI Editor BSD Linux
  • 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
Sheriff
Posts: 7616
522
Mac OS X VI Editor BSD Linux
  • 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: 69411
276
  • 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.
 
Bartender
Posts: 1248
86
Hibernate jQuery Eclipse IDE Angular Framework Spring MySQL Database AngularJS Tomcat Server Java
  • 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
Posts: 39996
807
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Confirmed and added to the errata
 
If you have a bad day in October, have a slice of banana cream pie. And this tiny ad:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic