knking.com -- Programming Language Books and Training

 C C++ Java

Books by K. N. King

Home
Books by K. N. King
Short courses
Recommended books
Recommended links
FAQ

Java Programming: From the Beginning

Errata

Errors were corrected in the second and fourth printings of Java Programming: From the Beginning. (To see which printing you have, look at the series of numbers at the bottom of the copyright page. The first number indicates the printing.)

To report errors or make suggestions, please email me.

Errors corrected in the fourth printing

Page 8. In the next-to-last paragraph, "installed (or written by) the user" should be "installed (or written) by the user." (Found by Margaret Hsu.)

Page 16. In the "Pascal" paragraph, "an 18th-century mathematician" should be "a 17th-century mathematician." (Found by Victor Kamat.)

Page 82. In the first line of the page, "commission" should be "commission rate."

Page 337. In the first hint following Programming Project 8, "previous month" should be "birth month" in two places. Also, "current year" should be "birth year."

Page 522. In the fifth line above the ConvertTemp program, FarenheitListener should be FahrenheitListener.

Page 526. In the third line from the bottom, "extends AdjustmentListener" should be "implements AdjustmentListener."

Page 566. In the first paragraph, itemToinsert.compareTo(a[i]) < 0 should be itemToInsert.compareTo(a[i]) < 0.

Page 635. The word "the" appears at the end of line 60 and at the beginning of line 61. (Found by Gina Bakonyi.)

Page 637. In the third line from the top, "will need to saved" should be "will need to be saved." (Found by Gina Bakonyi.)

Page 752. In the second line of the (only) paragraph, "move the removing statements" should be "move the remaining statements." (Found by Gina Bakonyi.)

Errors corrected in the second printing

Page 31. The Visual Café IDE is now sold by WebGain, not Symantec.

Page 35. The warning refers to System.out.print, which isn't discussed until page 41.

Page 48. The sentence preceding Table 2.3 should be deleted. It mentions operator precedence, which isn't discussed until page 49.

Page 121. The sentence "When an object is created, its instance variables are initialized by a constructor." appears twice in the Summary. (Found by Gina Bakonyi.)

Page 164. In the second sentence under "Multiple exit points within a loop," the word "many" should be "may." (Found by Robert Walker.)

Page 183. In the last sentence on the page, the use of the term "reference type" is premature, since reference types aren't discussed until page 268.

Page 185. In the paragraph above the "Processing the Elements in an Array" heading, the words "and" and "later" should be separated by a space.

Page 239. The first argument to the Font constructor on line 33 of StopSign.java should be "SansSerif".

Page 254. In Exercise 10 the default background color should be blue rather than black. (Found by Gina Bakonyi.)

Page 259. The first sentence after "To help other methods in the same class," should begin "Section 7.7 shows how to write ..." (Found by Gina Bakonyi.)

Page 262. In the paragraph in the middle of the page, "need to called" should be "need to be called." (Found by Gina Bakonyi.)

Page 273. For consistency with the rest of the book, the lines in the PrintArgs program should be numbered.

Page 293. In Exercise 7, "03:01 p.m." should be "03:01:25 p.m.". (Found by Gina Bakonyi.)

Page 337. In Exercise 8, the message "Input must no more than 1999" in the example should be "Input must be no more than 1999". Also, the message "Input must no more than 28" in the example should be "Input must be no more than 28". (Found by Gina Bakonyi.)

Page 349. In Table 9.3, the last action should be "Returns the arc tangent of a/b." (Found by Gina Bakonyi.)

Page 359. In the middle of the page, "A and Z" should be "A to Z". (Found by Gina Bakonyi.)

Page 376. In the last line of the answer to the middle question, Math.atan2(x, y) should be Math.atan2(y, x). The same correction applies to the first line of the following question. (Found by Gina Bakonyi.)

Page 383. In Exercise 8, the message "Input must A, B, C, D, or F" in the example should be "Input must be A, B, C, D, or F". (Found by Gina Bakonyi.)

Page 437. Line 24 should be

return new Money(toDouble() + m.toDouble());

Line 28 should be

return new Money(toDouble() - m.toDouble());

(Found by Gina Bakonyi.)

Page 463. On the third line above the Circle.java program, "radius" should be "diameter" in two places. Also, on line 8 of Circle.java, radius should be diameter. (Found by Wayne Jordan.)

Page 464. On lines 11, 13, 19, 23, and 27 of Circle.java, radius should be diameter. (Found by Wayne Jordan.)

Page 472. In step 3, "radius" should be "diameter." (Found by Wayne Jordan.)

Page 475. On lines 90-93 of NervousShapes.java, radius should be diameter. (Found by Wayne Jordan.)

Page 480. In part (c) of Exercise 10, the third sentence should read "... with "Diameter: d" added at the end, where d is the diameter of the circle." (Found by Wayne Jordan.)

Page 718. The description of the atan2 method should begin with the sentence "Returns the arc tangent of a/b." In the second sentence, the letters b and a in (b, a) should be in Courier but not italic. (Found by Gina Bakonyi.)

Page 745. For consistency with the rest of the book, the lines in the JavaRules2.html file should be numbered.

Page 748. For consistency with the rest of the book, the lines in the Message.html file should be numbered.

Page 752. The first argument to the Font constructor on line 33 of StopSign.java should be "SansSerif".

Page 753. The first argument to the Font constructor on line 29 of StopSign2.java should be "SansSerif".

Copyright © 2000-2006 K. N. King. All rights reserved.