1Z0-815 Book (Second Edition, August 1, 2020 Build 2.1): Typos in Chapter 14

Post Reply
JJJ2020
Posts: 20
Joined: Mon Sep 21, 2020 8:41 am
Contact:

1Z0-815 Book (Second Edition, August 1, 2020 Build 2.1): Typos in Chapter 14

Post by JJJ2020 »

I hope these submissions continue to be taken in the right spirit. What that spirit is will be recapitulated here:
There seem to be big disagreements about the quality of the book in reviews.
A minority opinion seems to think it is the best book for the price, the best value.
But more seem to think it is the best book regardless of price, and better content than the more expensive competitors as well.
So, improving what many people feel is the top book on an important topic is a worthy use of my time.
Besides, with the amount of proofreading I do at work on both code and docs, it is nigh impossible to read it as closely as I need to in order to study and not note these things. I am taking notes anyway, so, why not get some benefit for the whole community.

Anyway, Chapter 14 has the normal micro-quibbles and a question about whether the chapter lies on purpose or accidentally. :lol:

p. 356 features the words "More than one parameters" English idiom, drop the terminal s.

p. 357 1. "a - > return" contains a stray space within the -> operator. It won't compile anyway, but for the reason we mean to be illustrating that should be fixed.

p. 358 the name of the method inside showCars() changes from .showCar() to .test(), that is neither good nor bad, but it is a second change for a total of two. That's near the end of the page.

p. 359 and 360 contain another example of what I believe is an artifact of the book's generation from source code, i.e. that we lose the white spacing around <TypeParamerter>elements probably because it thinks they are HTML-like tags rather than Java language constructs. It does make it harder to follow thisintroductionofnovelsyntax.

p. 359 "when you have more than one checks" idiomatic use of singular in phrase, so 'check'

p. 360 4. Objects.equals() should be Object.equals()

Those are even more trivial than usual, but the last complaint isn't.
On page 352 we are asked to "think of it as if it defined and instantiated a class"
I am okay with describing lambdas that way as an "as if" introduction. Of course, old presentations would show it as a substitute for an anonymous inner class, which those studying Java for the 815 for the first time would just react to that with "What's an anonymous inner class??" But fine. In other languages and in some proposals, lambda functions do/did do just that, and it is an okay way for beginners to think of it.

But on page 354, you say it actually DOES this. I re-read it a few times and that is the impression the reader is left with.
It might have had to been done this way if they had decided that you could inherit from an abstract class, but the implementation in Java became very different and very interesting.
To know the full story of invokeDynamic which was added to the JVM in Java 7 for the benefit of Ruby, Groovy, etc. and in a turn of Good Reflective Karma turned out to be an almost perfect way with just a tweak to implement very low-cost, highly efficient lambda functions in Java 8 is beyond either my current knowledge or requirements for the 815 exam.
Ways to tell that Java does NOT implement lambdas with an inner class: Play around with javap -- outside the scope of this book.
Look on the disk -- no anonymous inner class files get added when we compile our java source filled with lambdas...
There's a lot of performance differences with not having to load from disk, create and destroy many instances of anonymous inner classes, but that can't be seen without actually coding anonymous inner classes in a solution for comparison.

The whole issue explained in 14.1.6 comes about because your lambda is not, indeed, operating in the context of a second class, but in the very one that its call appears in.

I have no idea how the text manages to serve the dual purpose of sticking to what's on the exam, yet not lying about the truth or ignoring things that will likely kill an interview after you pass the certifying test without even resorting to footnotes that other books like "Learning Perl" do -- but somehow you guys do it.

Except here, where we get a Santa Claus fairy tale about how lambdas work that isn't described as a parable. Yes, the truth isn't covered on the 815 exam, and I have no idea if it is going to be on the 819 exam or not (but I bet you guys will know about the same time as anyone outside of Oracle)...but the standard the book holds to everywhere else is that we don't get talked down to or lied to without at least saying "go look this up if you have time, it isn't on the exam but is interesting and impresses interviewers".

Welp, that's it for Chapter 14, doing the exercises and moving on to Chapter 15, the last "Big" one...

Cheers,
Jesse

admin
Site Admin
Posts: 8992
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

Re: 1Z0-815 Book (Second Edition, August 1, 2020 Build 2.1): Typos in Chapter 14

Post by admin »

>I hope these submissions continue to be taken in the right spirit.
Yes, absolutely. We sincerely appreciate your feedback. Most people would have just given a bad review and be done with it but you are making so much effort to let us know about the issues so that the material can be improved. That tells a lot about you. *Respect*.

>p. 358 the name of the method inside showCars() changes from .showCar() to .test(),
I think this is fine because cp is a reference to a Predicate, which has the test method. That is why it the code inside showCars calls cp.test(car).

Regarding lambdas and inner class, we will investigate and improve/fix the content.

The rest have been noted.

thank you,
Paul.
If you like our products and services, please help us by posting your review here.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest