本帖最后由 xing19900712 于 2012-02-02 11:27:33 编辑

解决方案 »

  1.   

    楼上同学,如果.java去了我就能理解了。原文没有去掉哦~
      

  2.   

    其实吧,我也觉得没啥可以问的。且不说别的,现在谁用记事本+命令行啊,都IDE了。关键是,关于这部分的内容,书上从第七版到第九版每班都会改掉些错误,加些东西。那为啥这么明显的错误没被改掉呢?所以前来请教一下有没有知道的。
      

  3.   

    实在蛋疼,所以翻墙去了corejava的官网 找到了答案,Acesidonu是对的,就是打错了。
    这里给大家附上第八版第一卷的所有错误吧,希望对大家有用!8th Edition Volume 1 (Java SE 6) Page 11 [2]
    In Table 1-1, change the year for Version 1.4 from 2004 to 2002
    Page 51 Figure 3-1 [2]
    Add an arrow from float to double
    Page 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 13
    Page 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 deadline
    Page 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 after 
    cloned.hireDay = (Date) hireDay.clone()Page 258 [2]
    Change javax.awt.Toolkit to java.awt.Toolkit
    Page 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 fileimport java.awt.*;Page 290 [2]
    Change 
    setLoationByPlatform(true);tosetLocationByPlatform(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 toclass NotHelloWorldComponent extends JComponentPage 344 [2]
    Change “you nee to know” to “you need to know”
    Page 352
    Add a } below repaint(); that lines up with the { below the if.
    Page 365 [2]
    In Figure 9-3, change WYSIWG to WYSIWYG
    Page 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]
    Change 
    appletviewer NotHelloAppletApplication.java
    java NotHelloAppletApplicationtoappletviewer AppletApplication.java
    java AppletApplicationPage 569 [2]
    Change try() to try
    Page 610 [2]
    Change setColor(Color.yellow) to setBackground(Color.yellow)
    Page 614 [2]
    Change 
    String filename = (String) names.get(0);toString 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]
    Change 
    PairAlg.swapHelper(result);toPairAlg.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]
    Change 
    V get(K key)toV 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 
    "<a\\s+href\\s*=\\s*(\"[^\"]*\"|[^\\s>])\\s*>"to"<a\\s+href\\s*=\\s*(\"[^\"]*\"|[^\\s>]*)\\s*>"Page 278
    Change @Resource("jdbc/corejava") to @Resource(name="jdbc/corejava")
    Page 425
    Change 
    super.getTreeCellRendererComponent(tree, value, selected, expanded, leaf, row, hasFocus);toComponent comp = super.getTreeCellRendererComponent(tree, value, selected, expanded, leaf, row, hasFocus);andsetFont(font);
    return this;tocomp.setFont(font);
    return comp;Page 529 [3]
    Change 
    skewedAngle = Math.toDegrees(Math.atan2(x * width, y * height));to skewedAngle = Math.toDegrees(Math.atan2(-y * height, x * width));