Errata

Print Print Icon

Submit your own errata for this product.


The errata list is a list of errors and their corrections that were found after the product was released. If the error was corrected in a later version or reprint the date of the correction will be displayed in the column titled "Corrected".

The following errata were submitted by our customers and approved as valid errors by the author or editor.


Color Key: Serious Technical Mistake Minor Technical Mistake Language or formatting error Typo Question



Version Location Description Submitted By Corrected
Printed Page Various
Various

Found in reprint [10/08] -- by author (Robert Liguori) Page 5, The text: "package com.oreilly.fish_finder" should end with a semi-colon, "package com.oreilly.fish_finder;" Page 28, For consistency with the rest of the book, there should be a space after the comment marks. "//This" should read "// This". "//if" should read "// if". Page 40, Minor refinement can be done by removing the words, "Note that". That is, "Note that subclasses do not have direct..." should read "Subclasses do not have direct..." Page 42, The text: "<$endrange>" should be removed. Page 52, The text: "(x == 1)" has an extra space and should read "(x == 1)" Page 53, The header "Iteration Statements" is missing associated text. The following text should be added after the header, "Iteration statements are used for iterating through pieces of code." Page 89, "Java Server Pages" has an inappropriate space and should read "JavaServer Pages". Page 98, Abstract classes, "Reader", "Writer", "FilterReader", "FilterWriter", "InputStream" and "OutputStream" should be italicized in UML, therefore Figure 11-1 should be updated. Page 106, "Sees whether a file exits" should read "Checks if a file exists". Page 111, "Java Collections Framework: Collections class algorithms; Collections class algorithmsArrayList" should read "ArrayList".

Robert Liguori
O'Reilly Author 
Printed Page xi
Bootm of the page

"...Chapters 9 though 18..." should read "...Chapters 9 through 18", as 'through' was misspelled.

Robert Liguori
O'Reilly Author 
Oct 2008
Printed Page 5,24,45
Various

The Chicago Manual of Style (The University of Chicago Press, 2003) states the following instruction for grammar usage: "i.e.; e.g. The first is the abbreviation for id est ("that is"); the second is the abbreviation for exempli gratia ("for example")..." To adhere to this instruction the following changes in the Java Pocket Guide should be made: Page 5: "(i.e., com, net...)" should read "(e.g., com, net...)". Page 45: "...all instances of a class (i.e., a counter)." should read "...all instances of a class (e.g., a counter).". Page 24: "...using primitives, e.g., iterating through primitives is a container, should be done..." should read "...using primitives (e.g., iterating through primitives is a container) should be done...".

Robert Liguori
O'Reilly Author 
Oct 2008
Printed Page 10
Under 'Separators'

Nine ASCII character separators are listed, but surely ':' (full colon) should be listed as the 10th. Colons are used as separators both in the enhanced for loop and also in the assert statement.

Note from the Author or Editor:
The Seperators text on page ten should read: Twelve ASCII characters delimit program parts and are used as seperators. ( ), { }, [ ] and < > are used in pairs. ( ) { } [ ] < > : ; , .

Michael callaghan 
Printed Page 33
Within the TIP

The TIP states: String classes are immutable. While this is accurate, the following would be more helpful to the reader: Objects of the String class are immutable. Objects of the StringBuffer and StringBuilder classes are mutable.

Note from the Author or Editor:
This errata was opened by myself.

Robert Liguori
O'Reilly Author 
Oct 2008
Printed Page 35
Close to top

On page 34, "In shallow cloning:" is represented as regulary text with a colon. This is correct. On page 35, "In deep cloning" is represented as bold-faced text without a colon. This is wrong. "In deep cloning:" should be represented as regular text with a colon (similar to that of "In shallow cloning:" on page 34).

Robert Liguori
O'Reilly Author 
Oct 2008
Printed Page 40
3rd paragraph

A sentence reads:

Note from the Author or Editor:
Replace the following sentence, "A subclass does have access to public, protected, and package members of the superclass." with the following two sentences, "A subclass does have access to public and protected members of the superclass. A subclass also has access to private members of the superclass where the same package is shared."

Matt Freake 
Printed Page 40
Bottom

The following statement... "The super keyword in the Curtain class's default constructor is to access..." should read "The keyword super in the Curtain class's default constructor is used to access..." * Note that the word 'used' was added and the words 'super' and 'keyword' were swapped.

Robert Liguori
O'Reilly Author 
Oct 2008
Printed Page 42
After Builder class.

"<$endrange>" must have been automatically inserted during the document conversion process. This text should be removed.

Anonymous 
Printed Page 43
6th paragragh - code example

code: printRows() { for (int button: buttons) System.out.println(names); } should be (to continue the example of the section): printRows() { for (String name: names) System.out.println(name); }

Anonymous 
Printed Page 53
last paragraph

The sentence

Note from the Author or Editor:
Replace "The enhanced for loop... is used to iterate through an array or collection of any object that implements Iterable." with "The enhanced for loop... is used to iterate through an array or collection that implements Iterable."

Michael Callaghan 
Printed Page 78,79
Center

Both instances of "Standard Query Language" should read "Structured Query Language".

Note from the Author or Editor:
Confirmed as errata created by author.

Robert Liguori
O'Reilly Author 
Printed Page 87
Last paragraph

The ending forward slash is missing in this website address: http://java.sun.com/products/archive It should read: http://java.sun.com/products/archive/ (plus the period for the end of the sentence)

Robert Liguori
O'Reilly Author 
Oct 2008
Printed Page 88
First Paragraph

Since J2SE 1.4.2 is basically EOSL (10/08) and J2SE 5.0 is reaching EOSL, the following text: J2SE version 1.3 has completed the Sun End of Life (EOL) process for the Solaris 9, Solaris 10, Windows and Linux platforms. should be replaced with: J2SE version 5.0 will have reached the Sun End of Service Life (EOSL) on October 30th, 2009.

Robert Liguori
O'Reilly Author 
Oct 2008
Printed Page 98
The first class on the right side should be Writer (not Reader). Note: It appears that this error was introduced by

cutting and pasting the left side of the diagram to the right, but not updating the class image.

Anonymous  May 2008
Other Digital Version 98
The first class on the right side should be Writer (not Reader). Note: It appears that this error was introduced by

cutting and pasting the left side of the diagram to the right, but not updating the class image.

Anonymous  May 2008
Printed Page 111
Table 12-5; second column, first data cell

"Java Collections Framework: Collections class algorithm; Collections class algoritmsArrayList" should read "ArrayList".

Anonymous 
Printed Page 111
table 12-5, first column, second row

About ArrayList operations: - get() and set() are listed as taking O(n) time - in fact they take O(1) time. - add() and remove() take O(1) as well, even if it's amortized. See for instance http://java.sun.com/j2se/1.4.2/docs/api/java/util/ArrayList.html - and I quote: "The size, isEmpty, get, set, iterator, and listIterator operations run in constant time. The add operation runs in amortized constant time, that is, adding n elements requires O(n) time. "

Note from the Author or Editor:
Modify row 1 from --------------------------------------------- | add, remove (from end) | ArrayList | O(1) | --------------------------------------------- to ----------------------------- get, set | ArrayList | O(1) | ----------------------------- Modify row 2 from --------------------------------------------------------- | get, set, add, remove (from index) | ArrayList | O(n) | --------------------------------------------------------- to -------------------------------- add, remove | ArrayList | O(n) | -------------------------------- These changes will align the table with the sited documentation (http://java.sun.com/j2se/1.4.2/docs/api/java/util/ArrayList.html) as well as the array list performance table (6.2) from Data Structures & Algorithms in Java, by Michael T. Goodrich and Roberto Tamassia (Wiley, 2006).

Anonymous  Oct 2008
Printed Page 112,113
Entire Code Listing

This is an unneccessary refinement, but will provide clarity for the reader. The existing code listing in the Comparator Interface section only sorts two elements (crayons). I have added two more crayons to be sorted in order to clarify through demonstration the underlying intent of the code, which is ordering. The entire code segment can be replaced with the following code segment: public class Crayon { private String color; public void setColor(String s) {color = s;} public String getColor() {return color;} public String toString() {return color;} } import java.util.Comparator; public class CrayonSort implements Comparator<Crayon> { public int compare (Crayon one, Crayon two) { return one.getColor().compareTo(two.getColor()); } } import java.util.ArrayList; import java.util.Collections; public class ComparatorTest { public static void main(String[] args) { Crayon crayon1 = new Crayon(); Crayon crayon2 = new Crayon(); Crayon crayon3 = new Crayon(); Crayon crayon4 = new Crayon(); crayon1.setColor("green"); crayon2.setColor("red"); crayon3.setColor("blue"); crayon4.setColor("purple"); CrayonSort cSort = new CrayonSort(); ArrayList <Crayon> cList = new ArrayList<Crayon>(); cList.add(crayon1); cList.add(crayon2); cList.add(crayon3); cList.add(crayon4); Collections.sort(cList, cSort); System.out.println("\nSorted:" + cList ); } } $ Sorted: [blue, green, purple, red]

Robert Liguori
O'Reilly Author 
Oct 2008
Printed Page 114
Center of the page.

The references for the books about generics and UML should be stronger. (1) "See Java Generics and Collections, by Maurice Naftalin and Philip Wader (O'Reilly), for..." should read "See Java Generics and Collections, by Maurice Naftalin and Philip Wader (O'Reilly Media Inc., October 2006), for..." (2) "Comprehensive information on UML is covered in UML Distilled, Third Edition, by Martin Fowler (Addison-Wesley)." should read "Comprehensive information on UML is covered in UML Distilled, Third Edition, by Martin Fowler (Addison-Wesley Professional, September 2003)".

Note from the Author or Editor:
The UML reference is on page 149.

Robert Liguori
O'Reilly Author 
Oct 2008
Printed Page 115
Last line

The statement that a

Note from the Author or Editor:
Add "public SpecialList(String s) {...}" after "public SpecialList() {...}" Replace "A generic object of this class could be instantiated as such: SpecialList<String> b = new SpecialList<String>("Joan Marie");" with "A generic object of this class could be instantiated as such: SpecialList<String> b = new SpecialList<String>();" Add to the end of this page, that is 'after' the above replacement: "If a constructor for a generic class includes a parameter type such as a String, the generic object could be instantiated as such: SpecialList<String> b = new SpecialList<String>("Joan Marie");"

Steve Etherington 
Printed Page 143, 146
The new tools should be placed alphabetically.

The following Java EE 5 application server should be added to the Web Applications Platforms list as it is maintained by Sun, open-source and very popular: Glassfish: https://glassfish.dev.java.net Glassfish is an open source Java EE server used for developing, integrating, and deploying applications, portals, and web services. The following tool should be added to the Development Tools list so there is CASE tools coverage: Enterprise Architect: http://www.sparxsystems.com/ Enterprise Architect is a commercial Computer Aided Software Engineering (CASE) tool that provides forward and reverse Java code engineering with UML. -- Robert Liguori, Author

Robert Liguori
O'Reilly Author 
Oct 2008
Printed Page 145,146
The location for the necessary changes is apparent.

Sun now uses terminology of "Java EE" versus "J2EE". Therefore, in the Web Applications section of the Third Party Tools Chapter, five instances of "J2EE" should be changed to "Java EE". Here are the explict updates: Page 145: - BEA WebLogic Server is a commercial Java EE server... Page 146: - Geronimo is a Java EE server... - IBM WebSphere is a commercial Java EE server... - JBoss Application Server is an open source Java EE server... - Oracle Application Server is a commercial Java EE server...

Note from the Author or Editor:
Just FYI... This errata was entered twice, the write-up is identical. Additionally, the following changeds should be made: Page 144: - The Spring Framework is a layered Java/'Java EE' application framework. Page 145: - 'http://www.jetbrains.com/' should read 'http://www.jetbrains.com/idea/' Page 145: - 'http://www.borland.com/' should now read 'http://www.codegear.com/products/jbuilder'

Robert Liguori
O'Reilly Author 
Oct 2008
Printed Page 145,146
The location for the necessary changes is apparent.

Sun now uses terminology of "Java EE" versus "J2EE". Therefore, in the Web Applications section of the Third Party Tools Chapter, five instances of "J2EE" should be changed to "Java EE". Here are the explict updates: Page 145: - BEA WebLogic Server is a commercial Java EE server... Page 146: - Geronimo is a Java EE server... - IBM WebSphere is a commercial Java EE server... - JBoss Application Server is an open source Java EE server... - Oracle Application Server is a commercial Java EE server... Note: I am the author, Robert Liguori

Note from the Author or Editor:
Just FYI... This errata was entered twice, the write-up is identical. Additionally, the following changeds should be made: Page 144: - The Spring Framework is a layered Java/'Java EE' application framework. Page 145: - 'http://www.jetbrains.com/' should now read 'http://www.jetbrains.com/idea/' Page 145: - 'http://www.borland.com/' should now read 'http://www.codegear.com/products/jbuilder'

Robert Liguori
O'Reilly Author 
Oct 2008
Printed Page 145,146
As explained.

Oracle has acquired BEA Systems and their application server. Therefore, the BEA WebLogic text on page 145 should be removed completely from the book: BEA WebLogic Server: http://www.bea.com/ BEA WebLogic Server is a commercial J2EE server used for developing, integrating and deploying applications, portals and web services. The following original Oracle text should be changed: Oracle Application Server: http://www.oracle.com/appserver/ Oracle Application Server is a commercial J2EE server used for developing, integrating and deploying applications, portals and web services. The new Oracle text should read: Oracle WebLogic Application Server: http://www.oracle.com/appserver/ Oracle WebLogic Application Server is a commercial Java EE server used for developing, integrating and deploying applications, portals and web services.

Note from the Author or Editor:
To clarify, the original Oracle text is being 'replaced' by the new Oracle text. The original BEA Weblogic text is being completely removed.

Robert Liguori
O'Reilly Author 
Oct 2008
Printed, Other Digital Version Page 157
class name

The class name on the right side should be ":Clarinet" (not ": Part"). Note: I believe this error was also introduced the same way (unmodified cut-and-paste).

Anonymous  May 2008