Win a copy of Kotlin for Android App Development this week in the Kotlin 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
  • Liutauras Vilda
  • Devaka Cooray
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Junilu Lacar
  • Paul Clapham
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • salvin francis
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

Errata OCP Guide - Chapter 3  RSS feed

 
Greenhorn
Posts: 5
3
  • Mark post as helpful
  • send pies
  • 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: 39129
723
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • 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
  • 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: 39129
723
Eclipse IDE Java VI Editor
 
Aurelien Gamet
Greenhorn
Posts: 5
3
  • Mark post as helpful
  • send pies
  • 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: 39129
723
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • 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.
 
All of the world's problems can be solved in a garden - Geoff Lawton. Tiny ad:
RavenDB is an Open Source NoSQL Database that’s fully transactional (ACID) across your database
https://coderanch.com/t/704633/RavenDB-Open-Source-NoSQL-Database
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!