Errata List for

Java: A Framework for Program Design and Data Structures, Second Edition

 Last updated on May 19, 2004

Below are the errors that have been discovered since the first printing. We are grateful to Jerry Cahill of Antelope Valley College for reporting these errors to us. Please report any additional errors to klambert@wlu.edu.

Page 32 Table 2.2, first column, "setPayRate" should be "void setPayRate" 2/25/04
Page 41 Third line, delete "only" from "only returns the class name" 2/25/04
Page 51 Last line of first paragraph. "method super" should be "reserved word super". 2/25/04
Page 76 Fourth paragraph, delete "only" from "Protected data and methods can be accessed only by subclasses of a class." 2/25/04
Page 81 Second code box, line 2, "Jlabel" should be "JLabel" 5/19/04
Page 83 Last code box, insert "import ioutil.Format;" on line 4 5/19/04
Page 116 Row 3 of "Class" column, "JscrollPane" should be "JScrollPane" 5/19/04
Page 158 Figure 5.5, rightmost nodes are missing a "\" 5/19/04
Page 166 First and third code boxes, "index-" should be "index--" 5/19/04
Page 175 Second code box, "index-" should be "index--" 5/19/04
Page 179 Question 14, "Question 12" should be "Question 13" 5/19/04
Page 189 Section 6.5, second paragraph, "generalizations" should be "specializations" 5/19/04
Page 191 Line 14 of code, "Tiny" should be "ArrayTiny" 5/19/04
Page 195 First code box: "c1.removeAll (c2);" should be "cv1.removeAll(cv2);" 5/19/04
Page 215 Code box, 3rd line: "I++" should be "i++" (lower case i) 5/19/04
Page 218 Code box, line 41: "is (isEmpty())" should be "if (isEmpty())" 5/19/04
Page 227 Table 7.6, " (4+5) ( + 4 5 + Pop..."

should be " (4+5) 4 5 + Pop..." (blank the 2nd column)
5/19/04
Page 263 Table 8.3, last line: "violate a stack's" should be "violate a queue's" 5/19/04
Page 289 Table 9.5, lines 1, 2, and 3 each contain one extra comma:

hasNext() 0 ,a b, c should read ,a b c

next() 1 a, b, c should read a, b c

remove() 2 a, b, c should read a b, c

set(e) 1 a, e should not bold face the "e"
5/19/04
Page 290 First paragraph: "If no item is highlighted, then remove and"should read "If no item is highlighted, then the following remove and" 5/19/04
Page 298 Code, line 219 "if (!hasNext())" should be "if (!hasPrevious())" 2/25/04
Page 301 Table 9.7: "remove() O(n) O(n)" should read "remove() O(n) O(1)" 5/19/04
Page 310 Line beginning with "boolean add(Object o)," rightmost O(n) should be O(1). 2/25/04
Page 327 Sixth line up from bottom, "You cannot rewrite the definition nonrecursively" should be "It is less convenient to rewrite..." 2/25/04
Page 328 Second code box, delete first "}" 2/25/04
Page 334 Code box, line 13, delete "reader.pause();" 5/19/04
Page 335 Exercise 10.1.1, last sentence. "methods" should be "method". 2/25/04
Page 335 Exercise 10.1.3, code box, first line, "b, when a = 0" should be "a, when b = 0" 5/19/04
Page 335 Exercise 10.1.3, code box, second line, "when a > 0" should be "when b > 0" 5/19/04
Page 344 Code box, line 8, "//add the rest" should be "//the rest". 2/25/04
Page 354 Section 10.5, 10th line, "process" should be "processes". 2/25/04
Page 398 Second paragraph, first line, "others methods" should be "other methods" 5/19/04
Page 442 First paragraph under Figure 12.5, "The leftmost tree is full and is said to be balanced." should be "The leftmost tree is complete..." 2/25/04
Page 461 Table 13.3, public Object put(object key, Object value), add to the "What It Does" column "and returns null." 2/25/04
Page 461 Table 13.3, public Object remove(Object key), "...removes and returns the associated value..." should be "...removes the key and returns the associated value...". 2/25/04
Page 509 First code box, line 3, "dfs (startVertex)" should be "dfs (g, startVertex)". 2/25/04
Page 516 Figure 14.12, gray boxes of the "included" column. The only "true" belongs in the "B" row, not in the "A" row. 2/25/04
Page 516 Figure 14.12, header "stance" should be "distance" 2/25/04
Page 585 Table A.1, "Java's Primitive Types" should be "Java's Primitive Numeric Types" 2/25/04
Page 591 First code box, comment should be"// Multiplies 3.14 by 6.0 and returns 18.84". 2/25/04
Page 594 Bottom code box, last line is missing a ')'.Should read "System.out.println(a[i]);" 2/25/04