Combined Errata
Page 0CD
The password for the ebook is located on page xxii not xxiv.
Page 9
Text Correction, Table 1.4: The size of "double" should be "64 bits" instead of "16 bits".
Page 18
Fifth line from the bottom: "import static measure.Scales.poundsToMicrograms();" is in error.
Remove the parentheses before the final semicolon, so the line reads "...poundsToMicrograms;"
Page 33
Question 18: The answer should be A and C. A is also legal.
Page 62
Line 2: "The expression 1 ? 2,..."
Should read: "The expression 1 + 2,..."
Page 69:
Answer to Question 4:
Last sentence: "C is illegal..." should read "D is illegal..."
Page 77:
Change the 2nd & 3rd bullet items. The 2nd item should read, in its entirety, "A class may read and write protected fields that it inherits from its superclass. This must be done through a reference of the subclass type, not of the superclass type".
-Replaces text as printed: "An instance may read and write protected fields that it inherits from its superclass.However, the instance may not read or write protected inherited fields of other instances."
The 3rd bullet item should read, in its entirety, "A class may call protected methods that it inherits from its superclass. This must be done through a reference of the subclass type, not of the superclass type".
-Replaces text as printed: "An instance may call protected methods that it inherits from its superclass. However, the instance may not call protected methods of other instances."
Page 96
Question 13:
Change the text of answer D. to read:
"If the class is declared abstract, it will compile but it may not be instantiated."
Page 99
Answer to Q13:
Correct answers are A, C, D; not C, D, as written. The explanation remains correct.
Question 14:
Change "can be declared" to "can all be declared"
Delete "Variables cannot."
Answer 17:
"A.. An object may call a protected method that it inherits a method from a superclass in a different package."
-Replaces text as printed: "B. An object that inherits..."
Page 107
Text Correction,
page 107, end of paragraph: "This relaxation of the rule applies only when the assigned value is an integral literal. Thus the second line of the following code wil not compile." Should be: "This relaxation of the rule applies only when the assigned value is an integral literal or final. Thus the second line of the following code will not compile." (Add "or final at end of first sentence.)
107, cont.
Text Correction:
The last line of code under "Assignment Conversion etc." (Heading on pg. 106):
"byte b = I" should read: "byte b = i;"
Page 126
Test Correction #2, page 126, Question 20, in the question body, change both occurrences of "conversion" to "conversion of references".
Page 128
Test Correction #1, page 128, Answer to question 12 is d (instead of e; no e present in question).
Page 148
Text Correction, Page 148: public PhaserBankException(String message, Throwable cause) implementation should be "super(message, cause);" and not "super(message);"
Chapter 5 Review Questions, page 157
In option C, line 2, change comma after "k=0" to a semicolon.
Page 165
Text Correction:
Number 10 answers are "B, D" instead of "A, B, D."
Page 175
Text Correction:
"14. printRJ("", w);" should instead read "14. printRJ (""+i, w);"
Page 194
Text Correction:
The fourth line of code: "Point3D that = (Point3D ob);" should read:
"Point3D that = (Point3D) ob;"
Page 211
Answer to Question 10: A, C, E.
Change the first sentence of the explanation to read: "A is legal because the enum body contains nothing except the list of constant nams, so no semicolon is required."
Page 277
Text Correction:
line 8: "Object first() Returns..." should read
"Object firstKey() Returns..."
Page 278
Text Correction:
2nd line of code beneath boxed text: "static Object min(Collection c) Returns the maximum element..." should read
"static Object min(Collection c) Returns the minimum element..."
Page 293
Text Correction:
Paragraph 7, 2nd line: "So, for example, the expression "(ab)*" matches one or more occurences..." should read
"So, for example, the expression "(ab)*" matches zero or more occurences..."
Page 300
Text Correction:
last line of code: "getInstance(Locale loc)" should read
"getCurrencyInstance(Locale loc)"
Page 307, Question 12
Change the line of code in the question:
"Map<String> names = new HashMap<String>()" to:
"Set<String> names = new HashSet<String>()"
Page 335
Text Correction:
The second-to-last line of code, at the bottom of the page:
"Import java.io.*;" should read "import java.io.*;"
(Replace uppercase "I" with lowercase "i")
Page 337
Text Correction:
The last line of code: "balance = ((Float)inStream.readObject()).floatValue();" should read:
"balance = (Float)inStream.readObject();"
|