Refactoring to Functional Style with Java 8

October 6, 2016 | 1 minute read
Text Size 100%:

Are you programming in a functional style? Venkat Subramaniam shows how to transition from an imperative to a functional style.  In this JavaOne session, he presents new APIs and what to look for while programming in a functional style. With functional style, your code is concise, more expressive, easier to understand, and easier to change. He describes 6 different exercises in which he first programs in an imperative before transitionning to a functional style. 

A breakdown of his presentation by topic:

  1. Functional style 
  2.  Exercise 1: is Prime 
  3.  Exercise 2: Lines count  
  4.  Exercise 3: Grouping  
  5.  Exercise 4: Decorator  
  6.  Exercise 5: Pythagoarean triples  
  7.  Exercise 6: Sum of sqrt of k primes starting with n 

His code samples are available at

Yolande Poirier

Yolande Poirier manages the online experience for the world's biggest IT community. She empowers developers to successfully grow their projects, businesses, and careers. Telling the story of how people use technology, she curates technical content, interviews IT professionals around the world, and write blogs about Java technologies and projects. She is a speaker at international conferences and JavaOne Rock Star, this year's track lead of the developer community day and a long time member of @jduchess, a network of women in Java. She manages @Java, a network of over 350,000 developer enthusiasts.

Previous Post

Java 8 Code Swim

Yolande Poirier | 1 min read

Next Post

The Java Trove: Part II

Yolande Poirier | 1 min read