• 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
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Errata for OCP: Oracle Certified Professional Java SE 8 Programmer II Study Guide - Chapter 4

 
Greenhorn
Posts: 9
1
Oracle Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Jeanne Boyarsky and Scott Selikoff

I love your book "OCP Oracle Certified Professional Java SE 8 Programmer II STUDY GUIDE"

Could you please check the last line on page: 220. It says "This makes the keys in the map the function value and the values. the function results."

I referred the link: JavaDocs

I think that the following line would be more accurate "This makes the keys in the map the result from applying the function to the input elements, and whose corresponding values are Lists containing the input elements which map to the associated key"

Thank you.
 
author & internet detective
Posts: 42103
933
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
Huzefa,
Welcome to CodeRanch!

That would be more precise. It's not an errata in that we didn't intend to say that and make an error. I've added it to our private list of things that could be clearer and we should update if we do a Java 9 version of the book.
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
On the same chapter 4, page 224 says that: "You can check if it contains a value with ifPresent() and get() the value inside.". I guess you meant isPresent()?
 
Jeanne Boyarsky
author & internet detective
Posts: 42103
933
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

Hilmi Masrafchi wrote:On the same chapter 4, page 224 says that: "You can check if it contains a value with ifPresent() and get() the value inside.". I guess you meant isPresent()?


Welcome to CodeRanch!

That is also listed in the errata
 
Huzefa Kaka
Greenhorn
Posts: 9
1
Oracle Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

I have a question from the Flash cards that are on the https://sybextestbanks.wiley.com/ website.
Card Set 3, Flash Card 32.

Question: Which Collector creates a Map with many keys?

Answer: groupingBy()

Could you please tell me if this should also include toMap()?
I referred the JavaDoc
 
Jeanne Boyarsky
author & internet detective
Posts: 42103
933
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
Yes, to Map() is also a correct answer.
 
If you want to look young and thin, hang around old, fat people. Or this tiny ad:
New web page for Paul's Rocket Mass Heaters movies
https://coderanch.com/t/785239/web-page-Paul-Rocket-Mass
reply
    Bookmark Topic Watch Topic
  • New Topic