• 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:

Errata OCP Guide - Chapter 3

 
Greenhorn
Posts: 5
3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,

In Chapter 3 page 115 the sentence near the bottom of the page:


A compiler warning is different from a compiler error in that all of the code still compiles with a compiler error.


should be:


A compiler warning is different from a compiler error in that all of the code still compiles with a compiler warning.

 
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
Good catch. Thanks for reporting it. I've added this to the errata
 
Aurelien Gamet
Greenhorn
Posts: 5
3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In chapter 3 page 131 at the top of the page, the second sentence after Java code reads:


Line 8 requests the element at index 2.


When it should be:


Line 8 requests the element at index 0.

 
Jeanne Boyarsky
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
Confirmed
 
Aurelien Gamet
Greenhorn
Posts: 5
3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm not as sure on this one but I think this is an errata. Sorry if I'm wrong.
Page 225 chapter 4, on the essential chapter called Write code for common intermediate operations.
It's written:


The flatmap() method flattens nested lists into a single level and removes empty lists.


I think it should be:


The flatmap() method flattens nested streams into a single level and removes empty streams.


As the signature for flatmap is:

So the Function parameter of flatmap needs to return a stream, not a list.
 
Jeanne Boyarsky
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
Noted and logged. It wasn't a typo, but it is sloppy language. I mentally think of streams as lists sometimes when I shouldn't.
 
After some pecan pie, you might want to cleanse your palatte with this tiny ad:
Low Tech Laboratory
https://www.kickstarter.com/projects/paulwheaton/low-tech-0
reply
    Bookmark Topic Watch Topic
  • New Topic