OO Programming with Java


Advanced Concepts

Java integrates functional programming concepts (as found in F# for instance).

Motivation: deal more easily with (big) data processing, increase simplicity, etc.

Illustration:

  1. How to define the abs(x) function in Java (5 different manners !)
  2. How to implement the following F# example in Java ?
map abs [-1;-2;-1;0;1]

1 - 17