Win a copy of Transfer Learning for Natural Language Processing (MEAP) this week in the Artificial Intelligence and Machine Learning forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Paul Clapham
  • Devaka Cooray
  • Bear Bibeault
Sheriffs:
  • Junilu Lacar
  • Knute Snortum
  • Liutauras Vilda
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Piet Souris
Bartenders:
  • salvin francis
  • Carey Brown
  • Frits Walraven

Possible errata in OCP Study Guide Exam 1ZO-809

 
Greenhorn
Posts: 4
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please find attached the Errata.jpg file
Errata.jpg
[Thumbnail for Errata.jpg]
 
author & internet detective
Posts: 39957
804
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Layne. Would you be able to copy/paste that as text in a reply? (If not, I'll deal with it as the image). But it would be easier for me as text and I'm sure you have it as text. So no harm in asking!
 
Marshal
Posts: 68899
275
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is something familiar about the p204 line. There was a long discussion about whether it is or isn't destructive, ages ago.
 
Layne Patel
Greenhorn
Posts: 4
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, certainly, Jeanne

P.158 Chapter 3: The second paragraph  should be: “For computeIfAbsent(), the functional interface runs only when the key isn’t present or value is null”.

P.204 Chapter 4 Table 4.5: The “Destructive to Stream” column of row 3 s.peek(System.out::println).count() should say Yes, because count() is a terminal operation

P. 251 Chapter 5 Figure 5.2: In the last rectangle of November changeover line the time should be: 2:00-3:00 (not 2:00-4:00)

P. 310 Chapter 6 Note: The last sentence in Note should be: “ Keep an eye out for a question that contains assert statement but that is not executed with assertions disabled (not enabled); the assert statement is ignored in that situation”

P. 314 Chapter 6: The last sentence should be: “You saw how the -ea and -enableassertions (not  -enableassertion) flags turn on assertions.

P. 341 Chapter 7  Code snippet: There should be also catch-blocks for InterruptedException and Execution Exception, because V get(long timeout, TimeUnit unit) method invoked on Future object throws InterruptedException, ExecutionExeption and TimeoutException

P.346 Chapter 7  Second paragraph : The second sentence should begin “ScheduledFuture<V> is identical to the Future<V> interface (not class)

P.372 Chapter 7 Third paragraph: The last sentence should be “In fact, they (stateful operations) should generally be avoided in parallel (not serial) streams wherever possible, since they prevent your streams from taking advantage of parallelization”, because stateful lambda expression in parallel stream produces unpredictable results at runtime

P.478 Chapter 9 First paragraph : The first sentence should be “Be aware that the entire file is read when readAllLines() is called, with the resulting String list (not array) storing all of the contents of the file in memory at once”, because the return type of readAllLines()-method is List<String>
 
Jeanne Boyarsky
author & internet detective
Posts: 39957
804
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Layne Patel wrote:Yes, certainly, Jeanne


Thanks! That makes it easier to read/reply to one at a time. It also lets me copy/paste to search and find stuff in the book.

Layne Patel wrote:P.158 Chapter 3: The second paragraph  should be: “For computeIfAbsent(), the functional interface runs only when the key isn’t present or value is null”.


Confirmed and added to errata.

Layne Patel wrote:P.204 Chapter 4 Table 4.5: The “Destructive to Stream” column of row 3 s.peek(System.out::println).count() should say Yes, because count() is a terminal operation


As Campbell alluded to, this has been discussed before. I don't believe it is an error because the intent is that peek() is not destructive. That said, enough people found this unclear that we rewrote the passage in our 816 book. We didn't change it to "yes". We updated to avoid the ambiguity. (Yes would be incorrect because it is count() that is destructive, not peek()).

Layne Patel wrote:P. 251 Chapter 5 Figure 5.2: In the last rectangle of November changeover line the time should be: 2:00-3:00 (not 2:00-4:00)


The diagram is correct. The boxes aren't representing hours. They are representing logical sections of what happens. All of them span 1am-4am.

Layne Patel wrote:P. 310 Chapter 6 Note: The last sentence in Note should be: “ Keep an eye out for a question that contains assert statement but that is not executed with assertions disabled (not enabled); the assert statement is ignored in that situation”


It's correct. That sentence is a double negative. "Not executed with assertions enabled" means "executed with assertions disabled". Which is when the assertion is ignored.

Layne Patel wrote:P. 314 Chapter 6: The last sentence should be: “You saw how the -ea and -enableassertions (not  -enableassertion) flags turn on assertions.


Confirmed and added to errata. Good catch!

Layne Patel wrote:P. 341 Chapter 7  Code snippet: There should be also catch-blocks for InterruptedException and Execution Exception, because V get(long timeout, TimeUnit unit) method invoked on Future object throws InterruptedException, ExecutionExeption and TimeoutException


The code is correct. THe method throws InterruptedException and ExecutionException so they don't need to be handled in a try/catch block. We explicitly handled the TimeoutException to call attention to the fact that there can be a timeout when waiting for results.

Layne Patel wrote:P.346 Chapter 7  Second paragraph : The second sentence should begin “ScheduledFuture<V> is identical to the Future<V> interface (not class)


Ideally yes. We sometime used "class" to mean "class or interface or enum"

Layne Patel wrote:P.372 Chapter 7 Third paragraph: The last sentence should be “In fact, they (stateful operations) should generally be avoided in parallel (not serial) streams wherever possible, since they prevent your streams from taking advantage of parallelization”, because stateful lambda expression in parallel stream produces unpredictable results at runtime


The statement is correct. It's saying that adding a parallel operation to a serial stream isn't a good idea. Because you have illusion of being parallel, but not as much as it appears.

Layne Patel wrote:P.478 Chapter 9 First paragraph : The first sentence should be “Be aware that the entire file is read when readAllLines() is called, with the resulting String list (not array) storing all of the contents of the file in memory at once”, because the return type of readAllLines()-method is List<String>


 
Right! We're on it! Let's get to work tiny ad!
Two software engineers solve most of the world's problems in one K&R sized book
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic