Please note my book comes from the Certification Kit (OCA+OCP). I guess this is kind of a "2nd edition" as many errata mentioned here seem to have been corrected.
Page : xxxix, #4
Error : In bullets 3, 5 and 7, "y taking a new value of ..." should be "count taking a new vale of ..."
Error : In bullet 3, "= (1 + 4) % 3" was corrected to "= (1 + 5) % 3"; but the real error was on the next line which should be "= 5 % 3" instead of "= 4 % 3"
Page : xli, #10
Error : "Reference one points to g1" should be "Reference one points to g2" (error on the errata page too)
Page : 20, line 2
Error : "initialized" should maybe be replaced by "declared"
Page : 55, note line 2
Error : "floating-point integers" should be replaced by "floating-point numbers"
Page : 57, lines 3 & 4
Error : in my book "multiplied" was replaced by "divided" in the first sentence, so instead of correcting an error a new one was added
Page : 107, line 2
Error : method signature should be : "int indexOf(int ch, int fromIndex)" (my book shows "int indexOf(char ch, int fromIndex)", the other one has been corrected)
Page : 110, trim()
Error : why does this specific method signature include the access modifier whereas all others omit it ? (this can be confusing)
Page : 127, line 5
Error : there's
Page : 131, lines 4 & 13
Error : "boolean" should be "Boolean"
Page : 169
Error : not really an error but a precision here : the return statement can (and should) be omitted if it would otherwise be unreachable. For example :
?
1
2
3
int foo() {
throw new NullPointerException();
}
Page : 247, line 19
Error : "Wolf overrides the parent class Canine" should be "Wolf extends the parent class Canine"
Page : 267, #4
Error : "marking a method" should be "marking an interface"
[OCP 21 book] | [OCP 17 book] | [OCP 11 book] | [OCA 8 book] [OCP 8 book] [Practice tests book] [Blog] [JavaRanch FAQ] [How To Ask Questions] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
Page : 335, #12
Error : if this question were about instance variables, option C would also be correct (Object defaults to null)
You are correct again. Added to errata
Page : 344, #9
Error : I am not sure about option C : shouldn't the accessor be named "getNumberWings" in order to be correct ? Is shortening really allowed ?
Page : 349, #17
Error : shouldn't the answer be B and C ? I have tried to compile the code and here is the output :
What should I answer if I stumble upon such a question on the real exam ?
Page : 351, #18
Error : I think A should not be a valid option as the question makes a clear distinction between "allowed" and "required"
OCPJSE8 97%,
Authorized Oracle Instructor,
OCAJSE8 Book: [url=http://igor.host/index.php/nailing-1z0-808/[/url]
Not sure if these have been already corrected (at least, they are not in the errata on selikoff.net), so here are my $.02:
Introduction, page xxxviii, Q17, option D, closing parenthesis is missing.
Introduction, page xxxix, explanation to Q3, reads: 'in the parent class Cougar' -> should be Puma
page 95, Q6: LOC 6 and option B are inconsistent: 'Just right' vs. 'Just Right'
page 126, reads: 'which half the target it IS' -> 'which half the target is IN' ?
page 138: 'California is three hours earlier than New York…' -> er… 'is 3 hrs BEHIND New York'?
page 150, table, right column: dt.format(f); -> should be f.format(dt);
[OCP 21 book] | [OCP 17 book] | [OCP 11 book] | [OCA 8 book] [OCP 8 book] [Practice tests book] [Blog] [JavaRanch FAQ] [How To Ask Questions] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
page 139: 'This time displays hours, minutes, seconds, and nanoseconds.' -> Yes, I admit that the API docs for LocalTime and its siblings speak of nanoseconds; however, there's no way on earth 18.401 can mean eighteen-dot-something nanoseconds: these must be milliseconds…
[OCP 21 book] | [OCP 17 book] | [OCP 11 book] | [OCA 8 book] [OCP 8 book] [Practice tests book] [Blog] [JavaRanch FAQ] [How To Ask Questions] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
OCPJSE8 97%,
Authorized Oracle Instructor,
OCAJSE8 Book: [url=http://igor.host/index.php/nailing-1z0-808/[/url]
OCPJSE8 97%,
Authorized Oracle Instructor,
OCAJSE8 Book: [url=http://igor.host/index.php/nailing-1z0-808/[/url]
page 178: "subclass of bird" -> Bird
page 241: "the Java compile performs" -> "compiler"
page 287: "You’ll see that without such rules in place, it is easy to construct an example with polymorphism in Java." -> probably: "…it isn't easy to…"
page 294: getWindSpan -> getWingSpan; same situation
page 254:
"At runtime the child version of an overridden method is always executed for an instance regardless of whether the method call is defined in a parent or child class method. In this manner, the parent method is never used unless an explicit call to the parent method is referenced, using the syntax ParentClassName.method()."
This wording doesn't sit with me well; reason:
Right now this syntax – ParentClassName.method() – covers only one scenario, where both parent and child methods are static, otherwise the code won't even compile.
IMHO, the call should be made via a parent object (as in new ParentClassName().method() and so on), which would cover both scenarios, that is, with static and instance methods alike.
page 346, explanation to Q27:
"The interface takes two int parameters. The code on line 7 attempts to use them as if one is a StringBuilder."
Here, I see two problems:
1) Interfaces do not accept params; methods do -> "The [functional] method takes…"
2) This one is major. The question is supposed to test us on lambda-related subjects but misses the target altogether. The dead giveaway is append().isEmpty(): this chain will never compile since isEmpty() is defined in String rather than StringBuilder -> whatever else the code's doing – say, is it 'lambding' properly or not – is actually irrelevant.
Replacing isEmpty() with equals("la-la-la") – because equals() is the only method in SB that returns a boolean – would be also too conspicous… (sigh)… Anyways, this LOC needs some camouflaging.
[OCP 21 book] | [OCP 17 book] | [OCP 11 book] | [OCA 8 book] [OCP 8 book] [Practice tests book] [Blog] [JavaRanch FAQ] [How To Ask Questions] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
Igor Soudakevitch wrote:– Missing parenthesis on page xxxviii, Q17, option D: What I see is this:
Igor Soudakevitch wrote:– Cougar vs. Puma on page xxxix. My copy reads: "Next, the class Cougar implements an overloaded version of getTailLength(), but since the declaration in the parent class Cougar is invalid, it needs to implement a public version of the method." And this is what page xxxi says:
[OCP 21 book] | [OCP 17 book] | [OCP 11 book] | [OCA 8 book] [OCP 8 book] [Practice tests book] [Blog] [JavaRanch FAQ] [How To Ask Questions] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
Jeanne Boyarsky wrote:
Page : 344, #9
Error : I am not sure about option C : shouldn't the accessor be named "getNumberWings" in order to be correct ? Is shortening really allowed ?
It is allowed. There isn't a rule that the method and variable names need to match.
The method name must have a prefix of set/get/is, followed by the first letter of the property in uppercase, followed by the rest of the property name.
Jorma Spitz wrote:Chapter 3 Mock Explanation #26:
Since the type of the ArrayList isn't a int but an Integer (wrapper class) its possible to add null to it. So Answer B should be wrong!
Jeremy Walker wrote:Following what this says, it seems getNumWings() shouldn't be a valid choice on the Chapter Review Question, especially beings the question specifically asks about JavaBeans naming conventions.
Table 4.5 is incorrect. It is legal (but less common) for a boolean getter to begin with get rather than is. This means that line 14 is just fine as a boolean getter.
Jorma Spitz wrote:You're right Jeremy. I got confused because in the explanation is written "Line 8 does not because null is not an int.". So the 'does not' referes to 'does not unbox'... I understood it as 'does not compile' because it's written right after it. But this is already in the Errata.
[OCP 21 book] | [OCP 17 book] | [OCP 11 book] | [OCA 8 book] [OCP 8 book] [Practice tests book] [Blog] [JavaRanch FAQ] [How To Ask Questions] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
Jeanne Boyarsky wrote:
Except that the table is wrong. From page 206 of the errata
Table 4.5 is incorrect. It is legal (but less common) for a boolean getter to begin with get rather than is. This means that line 14 is just fine as a boolean getter.
Option F is a throwable and not an exception, and so should not be caught
or declared.
Guram Savinov wrote:Actually Throwable instances (except Error and RuntimeException subclasses) are checked, so it should be:
Option F is an Error and so should not be caught or declared.
[OCP 21 book] | [OCP 17 book] | [OCP 11 book] | [OCA 8 book] [OCP 8 book] [Practice tests book] [Blog] [JavaRanch FAQ] [How To Ask Questions] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
[OCP 21 book] | [OCP 17 book] | [OCP 11 book] | [OCA 8 book] [OCP 8 book] [Practice tests book] [Blog] [JavaRanch FAQ] [How To Ask Questions] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
Don't play dumb with me! But you can try this tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
|