Tim Moroz

Greenhorn
+ Follow
since Nov 23, 2015
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Tim Moroz

I suspect that this is a nitpicking, but hope that at least it's worth of adding to your private list:
Page 483:

(...) to verify that is has been updated.


to verify that IT has been updated.
It seems I found a problem on this page: https://www.selikoff.net/java-ocp-8-programmer-ii-study-guide/

There's a row between pages 442 and 456 and the value in the column "Page" is the following:

various/td>

Pages 410-411

Output of main method in ReadFileInformation class:

When path points to a valid file:


and

when path points to a valid directory:


It seems that these two lines should be swapped to be consistent with the code.
Page 370:

Many common streams including map(), forEach(), and filter() can be processed independently, although order is never guaranteed.



It seems to me that "many common stream operations" would fit better, wouldn't it?
Hi Jeanne!

It seems I've found some more errata

page 347 in 2 pieces of code:

and


It seems to me that in both cases there should be MINUTES because TimeUnit class doesn't have the 'MINUTE' constant (Sorry for using 'should', it's a really convenient word...)
I saw that it has been noted already that DateTimeException is not a checked exception in the chapter 6 and it's recommended to "Pretend it is for the purposes of this chapter as the examples misuse it."
But my message is about DateTimeParseException in the "Exam Essentials".

Page 314:

DateTimeParseException, IOException, and SQLException are common checked exceptions.



DateTimeParseException is an unchecked exception.
I'm not sure, but it seems to me that this comment shouldn't be here.
Page 250:

Correct if I'm wrong please. As far as I know you make such a comment in the code only when it outputs something.
Page 230, review question #14 - explanation

The explanation says: "(...) Line 7 is where it all falls apart. Converting from a double to an int would require a cast inside the lambda."

After testing this piece of code on my machine it seems to me that for this line to compile one also needs to change "mapToInt" to "mapToObj".
Page 224
It looks like a typo:

"The most common functional interfaces are Supplier, Consumer, Function, and Predicate. There are also binary versions and primitive versions of many of these methods."

It seems to me that the author meant "interfaces" rather than "methods".
1) Extra comment
Code:



It seems to me (after running this piece of code on my machine) that there's an extra comment ("//") here.



2) The output in the book doesn't match with the output on my machine:

In the book:
"class. java.util.HashMap"
and
"class. java.util.TreeMap"

On my machine:
"class java.util.HashMap"
and
"class java.util.TreeMap"

P.S.: All the text is from the Amazon Kindle version of the book.
My JDK is v.1.8.0_91 from Oracle
Sorry, but I didn't quite understand your message: is my comment a bit wrong? I agree that the word "declares" would fit the best in here. And about the private list: do you mean that it's not the one on the selikoff.net?
Text: "The Comparator interface implements one method that takes two String parameters and returns an int."
I think this is incorrect. It should rather be "... interface has one method ...".