分类: LINUX
2011-05-19 09:22:11
On the bottom of the copyright page (facing the first page of the table of contents), look for a line such as
First printing, April 2008
In the errata below, we indicate the printing in which the error has been fixed inside square brackets such as [4].
For example, suppose you have the fourth printing. Then you can ignore all reports that are prefixed with [2], [3] or [4]. But you would want to pay attention to all reports that are prefixed with [5] or higher or that have no bracketed prefix at all.
8th Edition Volume 1 (Java SE 6)Page 11 [2]In Table 1-1, change the year for Version 1.4 from 2004 to 2002Page 51 Figure 3-1 [2]Add an arrow from float to doublePage 69 [2]Change “the decimal separator is a period, not a comma” to “the group separator is a period not a comma”Page 70 [2]Change "If the file does not exist, you can simply" to "If the file does not exist, it is created. You can simply"Page 90 [2]Change "This statement sets up an array that can hold 100 integers." to "This statement creates an array of 100 integers. When you create an array of numbers, all elements are initialized with 0. (Arrays of boolean are initialized with false, arrays of objects with null values.)"Page 91, 93, 100 [2]Change "entries" to "elements" (5x)Page 93 [2]Change “the copyTo method” to “the copyOf method”Page 93 Figure 3-14 [2]Change 12 to 13Page 103 [2]Change "entry" to "element" (2x)Page 107 [2]Change “Thinking about classes as cookie cutters.” to “Think about classes as cookie cutters.”Page 113 Figure 4-4 [2]Change the second birthday to deadlinePage 113 [2]Change "Variables are not automatically initialized to null." to "Local variables are not automatically initialized to null."Page 161 [2]Change MyProg.java to MyProg (2x)Pages 181, 185, 218 [2]Change “runtimeruntime” to “runtime”Page 192 [2]Change “see Volume II for more on threads” to “see Chapter 14 for more on threads”Page 197 [2]Change “Chapter 2 of Volume II.” to “Chapter 13.”Page 252 [2]Add a semicolon aftercloned.hireDay = (Date) hireDay.clone()Page 258 [2]Change javax.awt.Toolkit to java.awt.ToolkitPage 286 SimpleFrameTest.java [2]Replace lines 11-13 with EventQueue.invokeLater(new Runnable() { public void run() { SimpleFrame frame = new SimpleFrame(); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setVisible(true); } });Then add a line at the top of the file
import java.awt.*;Page 290 [2]ChangesetLoationByPlatform(true);to
setLocationByPlatform(true);Page 298 NotHelloWorld.java [2]Change lines 36 and 37 to NotHelloWorldComponent comp = new NotHelloWorldComponent(); add(comp);In line 45, change “panel” to “component”
Change line 47 to
class NotHelloWorldComponent extends JComponentPage 344 [2]Change “you nee to know” to “you need to know”Page 352Add a } below repaint(); that lines up with the { below the if.Page 365 [2]In Figure 9-3, change WYSIWG to WYSIWYGPage 392 [2]Add a semicolon after Border etched = BorderFactory.createEtchedBorder()Page 401 [2]Change "See Chapter 2 of Volume II" to "See Chapter 13"Page 506 [2]Change “when it was signed it” to “when it was signed”Page 535 [2]Changeappletviewer NotHelloAppletApplication.java java NotHelloAppletApplicationto
appletviewer AppletApplication.java java AppletApplicationPage 569 [2]Change try() to tryPage 610 [2]Change setColor(Color.yellow) to setBackground(Color.yellow)Page 614 [2]ChangeString filename = (String) names.get(0);to
String filename = (String) files.get(0);Page 618 [2]Change “wrong,and” to “wrong, and“Page 636 [2]Change “you can call the setObject method” to “you can call the setFirst method”Page 636 [2]Change “tests whether a pair contains a given object.” to “tests whether a pair contains a null reference.”Page 637 [2]ChangePairAlg.swapHelper(result);to
PairAlg.swap(result);Page 660 [2]Change “and and then removes” to “and then removes”Page 671 SetTest.java [2]Change line 26 to for (int i = 1; i <= 20 && iter.hasNext(); i++)Page 684 [2]ChangeV get(K key)to
V get(Object key)Page 717 [2]Change "the panel is never repainted because the addBall method has completely taken over all processing." to "the panel is only repainted after the addBall method has returned."
Page 730 [2]Change Thread().currentThread().interrupt() to Thread.currentThread().interrupt()Page 751 [2]Change “you should you should” to “you should”Page 760 [2]Change “Transfer $997 to from Account 1” to “Transfer $997 from Account 1”8th Edition Volume 2 (Java SE 6)Page 7 [3]In figure 1-3, the arrow from CharBuffer to Reader should instead point to the Readable interface.Page 83 [3]Change HrefMatch.java Line 33"])\\s*>"to
"]*)\\s*>"Page 278Change @Resource("jdbc/corejava") to @Resource(name="jdbc/corejava")Page 425Changesuper.getTreeCellRendererComponent(tree, value, selected, expanded, leaf, row, hasFocus);to
Component comp = super.getTreeCellRendererComponent(tree, value, selected, expanded, leaf, row, hasFocus);and
setFont(font); return this;to
comp.setFont(font); return comp;Page 529 [3]ChangeskewedAngle = Math.toDegrees(Math.atan2(x * width, y * height));to
skewedAngle = Math.toDegrees(Math.atan2(-y * height, x * width));Thanks to Yasir Bajwa, Chad Bamford, Fred Brasch, Lynn Robert Carter, Mark Chamberlin, Joseph Collins, Chris Colvard, Matthew Dempsky, Greg Drysdale, Douglas Eddy, Louis Fuka, Angelo Furfaro, Siegmar Gross, Richard Hall, David Hinkle, George Kollias, Ashok Kumar, David Lanznar, Larry LaPointe, James Lee, David Lyng, Jeremy Palmer, Diego Pérez, Łukasz Piwko, Boaz Porat, Philip Puryear, Dave Richards, Ken Rocha, Vickram Sawh, Zheng Song, Raj Subramanian, Viktor Toman, R. Wahl, Andrew Wan, Steven Zollo, Keoki Zee, and (your name might go here) for their bug reports!
Bug Report FormIf you have found another bug in the book or in our code that is not mentioned in this bug list or the , then please send a report. Please do not bug us with JDK problems, though. Unfortunately, we cannot reply personally to each report, but we do read all your comments.
Back to the page.