small medium large xlarge

Errata for Functional Programming in Java


The latest version of the book is P1.0, released over 1 year ago. If you've bought a PDF of the book and would like to upgrade it to this version (for free), visit your home page.

By default this page displays the errata for the latest version of the book. If you have a previous version, select it here:

If you've found a new error, please submit it.

  • Typo
  • Tech. error
  • Suggestion
  • Maybe next edition
  • Not a problem
  • Reported in: P1.0 (26-Mar-14)
Paper page: 0
I presume you folks have noticed that the *spine* of the printed book says: "Functional Pgrogramming in Java"? Admittedly, I often *feel* like I am p-...more...
  • Reported in: B8.0 (02-Mar-14)
PDF page: 19
the beginning of ch 2 states that Arrays.asList creates an immutable list. It does not. The list is fixed-size, but not fixed-contents. You can call "...more...
  • Reported in: B8.0 (17-Mar-14)
PDF page: 23
I think it is better to use the diamond operator as much as possible. For example: final List<String> uppercaseNames = new ArrayList<String>(); ...more...
  • Reported in: P1.0 (26-Jul-14)
Paper page: 24
You say in the next to last paragraph that "the map() method collects the result of running the lambda expression and returns the result collection." ...more...
  • Reported in: B8.0 (17-Mar-14)
PDF page: 34
Following code is not a good example: System.out.println(String.format("A name starting with %s: %s", startingLetter, foundName.orElse("No name fo...more...
  • Reported in: P1.0 (26-Aug-15)
PDF page: 39

In it is:

.collect(joining(", ")));

, but must be:

.collect(Collectors.joining(", "));--James Cook

  • Reported in: P1.0 (09-Jun-14)
PDF page: 68

Let quickly run these last three calls

should be

Let's quickly run...

  • Reported in: P1.0 (01-May-14)
PDF page: 74
In page 74 Designing Filters [[ wrapper.apply(input); The result of that call is the same as doing this: temp = target.apply(input); return nex...more...
  • Reported in: P1.0 (01-May-14)
Paper page: 74

I expected the filters to be applied in left-to-right order but it's the other way around.--Carey

  • Reported in: P1.0 (02-Oct-15)
PDF page: 89
If I have understood right example "wrapper = target.compose(next);" isn't really same as "temp = target.apply(input); return next.apply(t...more...
  • Reported in: P1.0 (01-Jun-14)
PDF page: 107
Lazy initialization with Holder class. This approach has the same problem why double checked locking fails. Potentially a thread can see a half-cre...more...
  • Reported in: P1.0 (10-May-14)
PDF page: 182
Since we are into removing code noise, this: System.out.print(String.format("A name starting with %s: ", startingLetter)); should be changed into th...more...
  • Reported in: P1.0 (22-Mar-14)
PDF page: 382
This code: str.chars() .forEach(ch -> ​System​.out.println(ch)); Won't work as expected. It will print out the int value for each char...more...