This table lists the errata we've found (or been told about) so far. They are listed in reverse chronological order, so it's easy to see whether there are any new entries since you last looked.

If you are the first to report a new one we'll thank you in the Remarks.

We should probably provide this same list sorted by page number to make it easier for you to see whether an error you've found is already in the list. If the list gets long we will do that. We hope it's never necessary.

Date
Page/program
line
Old
New
Remarks
5/14/04
129
two Strings in Figure 5-6
"billhome", "ebhome"
"cs110", "insult"
Picture should match text on page 123. Thanks to Dimpi S. Chheda.
4/15/04
7,10/Juno/
BadShellCommandException.java
14
ShellCommand command;
private ShellCommand command;
Access for this field should be private, which is not the default.
4/7/04
155, Exercise 6-5
Belongs in Chapter 7, not in Chapter 6.
To solve this problem you must deal with an Exception.
4/7/04
156, Exercise 6-11
158, Exercise 6-22
(*)
-- nothing --
The asterisk means the solutions to these exercises appear later in JOI source code. Byt they don't.
4/7/04
7,10/juno/CdCommand.java
43-46
if (sh.getDot().isRoot())
   
d = sh.getDot(); // no change
else
    d = sh.getDot().getParent();

if (sh.getDot().isRoot()) {
   
d = sh.getDot(); // no change
}
else {
    d = sh.getDot().getParent();
}
Our convention calls for braces in an if or else statement even when the body is just one line.
4/7/04
6,7,10/juno/Juno.java
26,27
private final static String os = "Juno";
private final static String version = ...

private
final static String
OS= "Juno";
private final static String VERSION = ...
Our convention wants UPPERCASE identifiers for final static fields. These changes force corresponding changes later in Juno.java. Thanks to Abrar Chaudhry.
3/25/04
5/bank/RegularAccount.java
35
7/bank/RegularAccount.java
38

public void newMonth() {

public void newMonth()
{
Our convention requires a new line for the opening brace of a method body.
3/24/04
OverridingDemo.java
10
// %> java OverridingDemo jessica Benjamin
// %> java Overriding jessica benjamin
File name error, and command output on following lines is for all lower case input.
3/11/04
4/bank/
--- nothing ---
bigbank.in, bigbank.out, littlebank.in, littlebank.out
These four files (referred to in Exercises 4-21 and 4-22) were available in pdf only. We have provided downloadable versions.
3/07/04
ArrayListDemo.java
75, 79
declaration {
declaration
{

Our convention says that the opening brace for the body of a declaration  should be on its own line.
3/06/04
95
footnote
for ( String line; line =
for ( String line; ( line =
Missing parenthesis. Never type code into a document - always paste from a program that compiles and runs! Thanks to Abrar Chaudhry
2/26/04
4,5,7,9/bank/Bank.java
(two lines in each file)
...read...("    amount:");
...read...("    amount: ");
Prompt missing a space after the colon. Cosmetic fix.
2/26/04
8/terminal/Terminal.java
243
    * @param prompt ...
    *
This method has no parameters, so @param is a javadoc error.
2/25/04
5/shapes/Shape.java
1
Standard four line header comment missing.
Added header lines with file name, copyright, authors.

2/20/04
3/shapes/Box.java
(and some other source files)
Problem: Internet Explorer  thinks file is a web page, not Java source.
Fix: pad initial lines with blanks so that any HTML in javadoc comments starts after 256 characters have been read.
When MSIE sees a file type it does not recognize it looks at the first 256 characters to try to guess what to do. If it finds any HTML markup it decides the file is a web page. But sometimes javadoc contains HTML markup, which confuses Explorer. Thanks (again) to Dimpi S. Chheda.
2/20/04
3/shapes/
 InterActiveShapes.java

33
int h = t.readInt("Box width: ");
int h = t.readInt("Box height: ");
Edited with cut and paste, didn't check the output carefully enough. Thanks to Dimpi S. Chheda.
2/15/04
288 ForDemo.java
12
missing line
// (for, counting down): 1 1 2 3 5 8 13
We should have run the code one more time and pasted the output in as a comment
1/29/04
1/bank/Bank.java
10
4/bank/Bank.java
15
* ... open, which opens the this Bank
* ... open, which opens this Bank
Extra word in comment does not affect performance but still needs fixing. Thanks to Tari Sikoki.
1/23/04
107
Figure 4-8
transactioncount (in three places)
transactionCount
Figure should match actual code, which correctly honors convention.
11/29/03 268
22
putput
output
Careless proofreading.
11/28/03
202
15
... methods, that different signatures, ...
... methods, with different signatures, ...
Careless proofreading.
11/25/03
35
16
Temperatures.java
Temperatures.java
Just a change to bold face.
11/25/03
277
8
string
String
The original will not compile. We should have tested this fragment as we did all full programs!
11/25/03 277
5,8
public static final
public final static
Both will compile but our style guide calls for the second.
11/25/03
302 EqualsDemo.java
40
// ... equal objects return the equal
// ... equal objects return equal
Extra word in comment.
11/25/03
1/bank/Bank.java
134
line is blank
   *
Missing asterisk in javadoc comment.

Return to JOI home page .