Skip to Content
Functional Programming in Java
book

Functional Programming in Java

by Venkat Subramaniam
February 2014
Intermediate to advanced
160 pages
4h 59m
English
Pragmatic Bookshelf
Content preview from Functional Programming in Java

A Little Sugar to Sweeten

We could implement all the ideas with what was already available in Java, but lambda expressions remove the ceremony and sweeten our efforts by adding a little syntax sugar. This quickly translates into code that’s faster to create and makes it easier to express our ideas.

In the past we’ve used a number of interfaces that only have single methods: Runnable, Callable, Comparable, and so on. These interfaces are common in the JDK library and often appear where just a single function is expected. All these existing library methods that expect a single method interface can now accept lightweight functions, thanks to the brilliant syntax sugar provided though functional interfaces.

A functional interface is an interface ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Functional Programming in Java

Functional Programming in Java

Pierre-Yves Saumont

Publisher Resources

ISBN: 9781941222690Errata Page