• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Errata - OCP Java 8 SE Study Guide - Chapter 7 Page 374 (Sybex)

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
On the list of Requirements for reduce() Arguments,

- first bullet point says
"The identity must be defined such that for all elements in the stream u, combiner.apply(identity, u) is equal to u."
What I find little confusing in this sentence is that combiner's work is not about combining stream elements but rather combining intermediate results, so my suggestion would be to say something like
"The identity must be defined such that for all possible intermediate results (?) u, combiner.apply(identity, u) is equal to u."

- second bullet point says
"The accumulator operator op must be ..."
Since accumulator implements BiFunction and not BinaryOperator, I personally wouldn't call it an operator as this also is little confusing for me in this particular context.


Please correct me if I'm wrong.
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to CodeRanch! I added the publisher to the subject so it is obvious which book this about.

I wouldn't call those errata. I'd call them things that could be more precise. I think it is more of an English/interpretation thing. In any case, I've added them to our private list of things to consider if we update for Java 9.
 
Józef Tokarski
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Okay great. And thanks for writing excellent OCA/OCP study guides.
 
All that thinking. Doesn't it hurt? What do you think about this tiny ad?
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic