View this PageEdit this PageAttachments to this PageHistory of this PageHomeRecent ChangesSearch the SwikiHelp Guide

Beta Mediacomp Java Book Errors

Please record errors in the book here

Page 35 - Creates a String object and
sets the characters in that
object to "Hi". Changes
the value in the object
reference "test" to refer to the
Stirng object.

"Stirng" should be "String"

p. 86 section 3.6.7 First code block has duplicated called to System.out.println(fileName);. the 2nd call and result are superflurious

Acutally the p. 86 3.6.7 is showing that if you print the value of a variable several times it still has the same value. It only changes when you change it. - Barb

p. 24 section 2.3.2 In the book is written "If you do add the semicolon at the end of a Java statement in the interactions pane it will execute the statement but not automatically print the result in the interactions pane", but if I type "34 + 12;" a "Syntax Error: ';'" message will display! I am using the current stable release for DrJava (20040326-2216). By the way, congratulations for the great work in writing this book. Antonio Barros (Brazil)

This is because 34 + 12 isn't a complete statement in Java and doesn't require a semicolon. - Barb

p.31 section 2.4.2 (bottom of the page) It is written "We will use type type double to store the bill amount,...". "type" is written twice. Antonio Barros

The examples in the book include many file paths, most of which don't work on either architecture. For example: C:intro-java-prog/mediasources/beach.jpg, on a windows PC, this should be: C:\\intro-java-prog\\mediasources\\beach.jpg, and on unix machines obviously the C: needs to be removed. I haven't seen a comment on this so posting it here. Andree Jacobson (UNM)

p. 103 section 4.3 (middle of the page) It is written "After the statements in the body of the loop are executed the index = index + 1; will be executed which will add one to the current value of index." This is misleading since the statement incrementing index is also in the body of the loop. While the while-loop flowchart highlighted this statement as being the last one in the body of the loop, it is still clearly in the body of the loop.

It should be changed to: After the other statements in the body of the loop are exectued the index = index + 1; will be executed which will add
one to the current value of index. - barb

p. 123 section 4.3.10 It is written "This is an overly simply notion of grayscale". It should say "simple

P. 149 section 5.2.2. It is written "We'll copy them all into the blank image 640x480.jpg". Two pages later at the bottom of page 151, however, the code uses a different blank image: String fileName = FileChooser.getMediaPath("7in95in.jpg");

Oh... I forgot to add my name to the three entries above. Alvaro Monge (CSULB)

Link to this Page