Win a copy of High Performance Python for Data Analytics this week in the Python 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
  • Paul Clapham
  • Ron McLeod
  • Bear Bibeault
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Jj Roberts
  • Carey Brown
Bartenders:
  • salvin francis
  • Frits Walraven
  • Piet Souris

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: 40400
821
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.
 
You firghten me terribly. I would like to go home now. Here, take this tiny ad:
the value of filler advertising in 2020
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic