This week's book giveaway is in the NodeJS forum. We're giving away four copies of Serverless Applications with Node.js and have Slobodan Stojanovic & Aleksandar Simovic on-line! See this thread for details.
Thank you all for your sharp eyes! Below is the updated errata list for our SCJP 5 book.
I'm going to leave this thread locked - so it will be readable but not update-able. What I'd like to request is that if you have a doubt about this errata list or if you think you've found another error, please start another thread and include "Doubt in K&B SCJP 5: topic _____" in the Subject of the thread. That way we can all discuss it and decide whether it's a real errata or not. What we've discovered is that some fraction of the "errata" that are reporting are actually not errata, so this is an attempt to keep the errata list as useful as possible. Once we've agreed that a new errata has been found, we'll add it to this list.
Some of the errata that come in are hard for us to deal with. We want the errata list to be as useful as possible, so some very minor typos are excluded from this list (although they will be fixed in the next printing). In addition, some people have found exceptions to statements in the book, but they are statements that are true as far as the exam is concerned. I'd like to use one of Kristian's erratas as an example (BTW, thanks Kristian for all your thorough research and help with these errata!): Kristian has pointed out that a method-local inner class can have the strictfp modifier. While this is (probably) true, it's not on the exam. We want to keep the book as focused as possible, so this kind of rare exception is a little tricky. What we think we're going to do in the reprint is add something like "While it's not on the exam..." when we need to clarify this kind of thing.
Finally, we're sorry for every errata in the book! We try really hard to find them all before publication, and our crack review team does the same. While we aren't making any excuses, we do believe that this particular book gets a lot more public scrutiny than most other tech books, which results in a more extensive errata list.
Again, we're going to lock this thread, but we urge you to create new "K&B doubt" threads for any related discussions!
Bert and Kathy
SCJP 5 - Errata 7/28/06
(New since April marked with an * after the page number)
..9....clarify...Listener methods must end in "Listener"
.14.*..bug.......2nd para. was: Apart from using...in Chapter 10, you can do one of...
...........................s/b: You can do one of two things...
.41....typo......2nd declaration s/b: final int recordNumber
115....clarify...last sentence before exam watch s/b:
If any superclass in its inheritance tree has already provided concrete (i.e., non-abstract) method implementations, then, regardless of whether the superclass declares that it implements the interface, the subclass is under no obligation to re-implement (override) those methods.
229.*..clarify...2nd to last para.: Non-"true" String constructors equate to "false"
233....bug.......In table 3-3, valueOf for Boolean does not throw NFE
234....bug.......1st two S.o.p.'s s/b: ("y = " + y);
235.*..typo......2nd para. "So, under the covers..." was: "i++", s/b: "y++"
236....clarify...Sentence before bullet points s/b: In order to save memory, two instances of the following wrapper objects, created through autoboxing, will always be equal...
236....clarify...Add this sentence: When == is used to compare a primitive to a wrapper object, the wrapper object will be unwrapped to its primitive value, and the comparison will be made between the two primitives' values.
240.*..typo......Para. after "Byte, Byte", 1t sentence, "int" s/b "byte".
258....clarify...2nd boxing bullet s/b: Using == with wrappers created through autoboxing is tricky; those with small values...
259....clarify...Q-2: code s/b: Short story = 200;
322....clarify...Near the bottom of the exam watch, sentence s/b: But the only variables that can be assigned (rather than tested against something else) are a boolean or a Boolean; all other...
case 2: y = 3; break;
case 3: y = 9; break;
case 4: y = 27; break;
default: assert false; // we're never supposed to get here
421....typo...... bottom of page, s/b: x+= " ocean";
439....bug.......2nd 2. s/b: Create a Writer or a Stream. Specifically, create a FileWriter, a PrintWriter, or a FileOutputStream.
454....bug.......2nd paragraph s/b: ...(unless you implement readObject())...
472....bug......."Finding stuff" bullet, last sentence s/b: We'll use the java.util.regex.Pattern , java.util.regex.Matcher, and java.util.Scanner classes to help us find stuff.
492....bug.......Last paragraph s/b: ...and to deserialize an object invoke readObject().
497....bug.......6th bullet: was matcher() s/b: matches()
505....typo......top of page: was: "dir1" and "dir1"
& 517.........................s/b: "dir1" and "dir2"
507.*..bug.......F & G, replace "override" with "implement" and in the answer for A, B, D, and E:
& 520............s/b: ...you don't implement the defaultReadObject() method, you call it from within the readObject() method...
538....bug.......In figure, LinkedHashMap s/b a subclass of HashMap
562....bug.......After big code listing, s/b: ...not predictable: HashSets do not guarantee any ordering.
574....big bug...The top 2/3 of the page uses a HashSet / Set example. It should be using an ArrayList / List example, so replace 10 occurrences of "Set" with "List", and replace 2 occurrences of "HashSet" with "ArrayList".
581....clarify...Exam watch should be: ...even if that Object reference refers to an Integer (or some other wrapper object) on the heap.