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

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: 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
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: 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
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: 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
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.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic