• 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
  • Devaka Cooray
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Jeanne Boyarsky
  • Tim Cooke
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Mikalai Zaikin
  • Carey Brown
Bartenders:

Question on OCP Study Guide

 
Greenhorn
Posts: 6
1
  • Likes 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
In the Comparator example given at the front of page 152, it says return r1.id = r2.id. Shouldn't it be return r1.id - r2.id, since we are using it as a comparator?

Thanks,
Ying
 
author
Posts: 4335
39
jQuery Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Ying,

Yes, this is an error, most likely caused when the book was type set. Thank you so much for finding and reporting it! We will update our errata page to include it: http://www.selikoff.net/ocp

Thanks again!
 
author & internet detective
Posts: 41774
887
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
Ying,
Welcome to CodeRanch! Thanks for letting us know. You are now credited with finding this in the errata.
 
Ying Zhao
Greenhorn
Posts: 6
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks, authors. Would you please also change my name on http://www.selikoff.net/java-ocp-8-programmer-ii-study-guide/ page to Ying Zhao? It writes Ying Zhou there by mistake. Thanks in advance.

Regards,
Ying
 
Ying Zhao
Greenhorn
Posts: 6
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Oh, does this count as another error I reported? Just kidding.
 
Jeanne Boyarsky
author & internet detective
Posts: 41774
887
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
Sorry, fixed.
 
Ying Zhao
Greenhorn
Posts: 6
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear Authors,

In Table 3.11 on page 159, I think Functional Interface used for computeIfAbsent and computeIfPresent are mixed. Please have a look.

Ying
 
Jeanne Boyarsky
author & internet detective
Posts: 41774
887
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
Confirmed and logged. Thanks.

If/when you find more, can you start a new thread (and stick the publisher - Sybex - and page number in the subject). Now that the book promo is over, that will make it easier for people to find/reply.
 
It's weird that we cook bacon and bake cookies. Eat this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic