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

Some possible errata in OCP Sybex's book

 
Ranch Hand
Posts: 31
3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Hello all!

In page 140, in table 3.7 it says that in Maps and Sets the elements are not ordered. However, TreeSet and TreeMap both sort their elements, and since I think that sorting implies ordering the table's statement may not be completely accurate.  

In Chapter 4, page 187, table 4.3, I think that the question marks in “For Intermediate Operations?” and “For Terminal Operations?” might be redundant or lead to confusion (in me, at least). Because there is already a “?” in each scenario. Just a suggestion.

Finally, in page 201, bellow “Before you say that it is harder to read, we can format it:”, I believe it has to be:

list.stream()
.filter(n-> n.length() == 4)
.sorted()


instead of:

stream.filter(n-> ...)


That's it.

Thanks!
 
author & internet detective
Posts: 41763
885
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

Tomas Castagnino wrote:In page 140, in table 3.7 it says that in Maps and Sets the elements are not ordered. However, TreeSet and TreeMap both sort their elements, and since I think that sorting implies ordering the table's statement may not be completely accurate.  


The table is not an errata. It is an important distinction. The Map and Set interfaces do *not* provide ordering. If the exam asks you about an interface that orders elements, the answer is List or Queue. If the exam asks about a class, it is a different story. That's cover in table 3.8. Read carefully on the exam. You don't want to get a question wrong because you were thinking about implementations when asked about an interface!

Tomas Castagnino wrote:In Chapter 4, page 187, table 4.3, I think that the question marks in “For Intermediate Operations?” and “For Terminal Operations?” might be redundant or lead to confusion (in me, at least). Because there is already a “?” in each scenario. Just a suggestion.


Hmm. Mixed feelings on that one. I definitely see your point and added it to the list of things to consider changing if we update the book for Java 9.

Tomas Castagnino wrote:Finally, in page 201, bellow “Before you say that it is harder to read, we can format it:”, I believe it has to be:

list.stream()


That one is definitely an errata! Adding to the list.
 
Aaaaaand ... we're on the march. Stylin. Get with it tiny ad.
Low Tech Laboratory
https://www.kickstarter.com/projects/paulwheaton/low-tech-0
reply
    Bookmark Topic Watch Topic
  • New Topic