UNIX Socket FAQ

A forum for questions and answers about network programming on Linux and all other Unix-like systems

You are not logged in.

#1 2013-12-04 09:00 PM

RipRage
Member
From: England
Registered: 2010-01-06
Posts: 146

Possible fault with textbook

Hey Guys,

Apologises for another random thread, just wanted to ask you both for your opinion on something, the textbook supplied for our module: Object-orientated Java program (written by lectures from the university) seems to have a fault, I wanted your opinions before I challenge it.

There's no easy way I can show you the exact pages unless I scan them or hunt around for a PDF version but ill do my best to express my point.

Page 92 simple states that the following integer types are

byte 8 bits, short 16 bits, int 32 bits, long 64 bits, float 32 bits, and finally double 64 bits. So far so good, however, through out the text they constantly refer a double as being 32 bits and an int as 16 bits, quote "a double occupies 32 bits while an int occupies 16 bits"

Ive seen this on many occasions now and its wrong! a short int is 16 bits and a float is 32 bits, a double is 64 bits!!!! Yeah I know that a standard int can be either 32 bits or 16 bits depending on machine architecture(not sure if this is the case with java and the JVM), however, it still should be stated, they clearly explain that references (similar to if not the same as pointers) are 32 bits or 64 bits depending on machine architecture....

What are your views on this ?

Many thanks!

Last edited by RipRage (2013-12-04 10:00 PM)

Offline

#2 2013-12-05 09:42 AM

i3839
Oddministrator
From: Amsterdam
Registered: 2003-06-07
Posts: 2,239

Re: Possible fault with textbook

Java types are machine independent, and even if it's C they can't say stuff like that,
exactly because it's machine dependent. So tell them they made some mistakes and
ask them to fix it. Or ask them to explain the text, which gives them a chance to
"discover" the mistakes themselves and also makes it clear why they should fix it.

To me such a mistake is a sign that no one really cares about the textbook and that its
quality is questionable. The only good excuse would be that it's very old and adapted
to Java, 32-bit and 64-bit later, but they forgot to update all sentences.

Offline

#3 2013-12-05 01:23 PM

RobSeace
Administrator
From: Boston, MA
Registered: 2002-06-12
Posts: 3,847
Website

Re: Possible fault with textbook

Offline

#4 2013-12-05 01:50 PM

RipRage
Member
From: England
Registered: 2010-01-06
Posts: 146

Re: Possible fault with textbook

Offline

#5 2013-12-05 10:07 PM

RobSeace
Administrator
From: Boston, MA
Registered: 2002-06-12
Posts: 3,847
Website

Re: Possible fault with textbook

Offline

Board footer

Powered by FluxBB