First Printing Errata (November 3, 2004)
Chapter 2
Page 38, Line 5 in ComputeArea.java source listing, change "PI +" to "PI =".
Page 39, bottom side bar note shows cube root instead of 3 dividing into 7. Symbol should be changed to a division sign.
Page 54, The second last line in the first NOTE, showMessageDialog(x) should be showInputDialog(x).
Page 65, Three lines before Table 2.13, delete for (1 < 0) is %b,
Page 69, The last code line in the class ShowLogicErrors in Section 2.19.3 should be
System.out.println("number2 is " + number2);
Chapter 3
Page 92, the last screen shot in Figure 3.7 is wrong. "10" should be "9".
Chapter 4
Page 126, Line -5, Syste.out.println should be System.out.println
Page 149: Code Line 132 replace "year % 100 137 != 0" with "year % 100 != 0"
Page 160, Line 6, the command to set classpath should be
set classpath=.;c:\book;
Page 169, Line -5, Exercise 2.11 should be Exercise 2.12.
Chapter 6
Page 254, Exercise 6.5, change GregorianCalendar.DAY to GreogorianCalendar.DAY_OF_MONTH.
Page 255, In the Vote class diagram in Figure 6.29, change +Count to +Vote().
Chapter 7
Page 259, In the java.lang.String class diagram,
+getChars(int srcBegin, int srcEnd, char[] dst, int dstBegin): void
should be
+getChars(srcBegin: int, srcEnd: int, dst: char[], dstBegin: int): void
ine 11, trime() should be trim().
Page 264, Line 11, trime() should be trim().
Page 264, Line -7 and -11, "Returns the index of the first (last) character of the substring" should be "Returns the index of the first character of the (last) substring".
Page 275, Line -9, ture should be true.
Page 283, Last line, ture should be true.
Chapter 9
Page 316, in Figure 9.1, under the GeometricObject box, the findArea() and findPerimeter() methods should be in italic.
Page 323, insert in Line 18,
calendar.get(Calendar.HOUR_OF_DAY) + "\t" +
Chapter 10
Pages346-347, in Section 10.3.2, change all occurrence of "aggregated object" to "aggregating object".
Chapter 11
Page 373, at the end of the first paragraph in Section 11.3.2, change "JDialog" to "JPanel".
Page 384, Section 11.5.4, change "vGap" to "vgap", "hGap" to "hgap", "setVGap" to "setVgap", and "setHGap" to "setHgap".
Page 385, Line 9, change "yellow" to "red".
Chapter 12
Page 442, Line 3, change "mouse event" to "key event".
Chapter 13
Page 450, Figure 13.4, change Boolean to boolean.
Page 460, Line 10, change "46-60" to "43-57".
Page 473, Figure 13.28(b) is wrong. All the selected items must be consecutive in SINGLE_INTERVAL_SELECTION.
Chapter 14
Page 521, Line 4 in Listing 14.10, change "extends Component" to "extends JApplet"
Chapter 16
Page 579, In Figure 16.7, Line 3, byte[] should be char[], and change "closes this input stream" to "closes this output stream".
Chapter 19
Page 699, Code Line 51 and Line 66, "account.getBalance()" should be replaced by "getBalance()".
Chapter 23
Page 847, Lines 7 and 8, change JPopupMenu(new JMenuItem("New")) to jPopupMenu.add(new JMenuItem("New")) and change JPopupMenu(new JMenuItem("Open")) to jPopupMenu.add(new JMenuItem("Open")).
Chapter 25
Page 972, six lines under Table 25.3, the command to set classpath should be
set classpath=%classpath%;c:\book\mysqljdbc.jar;c:\book\classes12.jar
Credits: Sophiana Chua Abdullah (Institut Teknologi Brunei), Yang Ang (University of Wollongong, Australia), Henry Beitz, Patrick Cate, James Chegwidden (Tarrant County College), Stylianos Drakatos (Florida International University), Roberto A. Flores (Christopher Newport University), Dennis Hayes (EDS), Disorn Homchuenchom (Thammasat University, Thailand), Jonathan McCarver, Michael L. Mick (Purdue University Calumet), Vira Sriratanakoul (Armstrong Atlantic State U.), Ainee Suriani (Multimedia University, Malacca Campus, Malaysia), Ken Wong
Please send errata to liang@armstrong.edu. Thanks for helping improve the book!

