-
Section 4.2.1, page 64: Third line from the bottom should read "this property is
an integer..." rather than "this property is
a integer..."
-
Section 5.2.4, page 110: The variable labeled
room in Figure 5.4
should be labeled location.
-
Section 5.3.1, page 123: The method
main in CounterTest declares a variable named interface. interface is a key word and cannot be the name of a variable.
-
Section 8.3.2, page 191: Method
getChoice should invoke readInt, not getInt.
private void getChoice () {
input.readInt();
-
Section 8.3.2, page 194: Method
getChoice should invoke readInt, not getInt.
private void getChoice () {
input.readInt();
-
Section 12.2, page 275: The ensure: is missing from the specification of
isEmpty. It should appear before the line
this.isEmpty() == (this.size() == 0)
-
Section 13.2.3, page 313: Method
sort is missing the declaration of the
boolean
variable done.
-
Section 13.3, page 316:
itemIndex is simply an identifier and not a keyword. It should not appear in bold face near mid page.
-
Section 13.3.1, page 318: Method
indexOf is missing the declaration of the
int
variable i.
-
Section 13.4, page 322: The third paragraph should read:
Now in the loop, low is only modified by being assigned
mid + 1, and high is only modified by being assigned
mid - 1. Thus (1) implies...
-
Section 13.4, page 324: Comment on the statement that
low equals
high + 1. (Note: this is not an erratum.) The while condition guarantees
that low > high when the loop terminates. If low > high+1, then the loop invariant tells us
list.get(high+1) < item
list.get(high+1) >= item
which is not possible if we have an order.
-
Section 17.3, page 423: Class
QuickSorter should implement the interface Sorter, not extend it.
-
Section 17.3, page 429: The declaration of
i in method partition should read:
int i; // index of the next item of list
-
Section 17.3, page 429: Semicolon is missing after the invocation of the method
interchange near the bottom of the page:
interchange(list,pi,i);
-
Section 19.2.2, page 473: Figure 19.10 is not correct. It should show a simple
JFrame, similar to that shown in Figure 19.13.
-
Section 19.4.1, page 487: Second sentence of the third paragraph should read
"we must cast the result..." rather than "we must coerce the result..."
-
Section 19.5.6, page 498: "
DISPOSE" is misspelled on the last line of this section.
-
Section 20.2.6, page 529: Class
RTLogger should have a method for closing the log file:
/**
* Close the log file.
*/
public void close () {
logFile.close();
}
-
Section 21.4, page 540: The reference to Table 21.1 near the middle of the page should be to Table 21.2:
"To get some idea of the implications, Table 21.2..."
-
Section 21.5.2, page 550: Recursive invocations should be to method
maxSublistSum, not maxSubList:
maxLeftSum = maxSublistSum(list, first, mid);
maxRightSum = maxSublistSum(list, mid+1, last);
-
Section 22.2, page 566: Method
toString is missing its return statement:
return s;
-
Section 22.3, page 576: Method
clone is missing a closing brace.
-
Section 23.1.1, page 589: The method
add is missing a
void
specifier:
public void add (int i, Object obj) {