2018-10-21

Java 9 : functional programming

Functional programming--the ability to treat a certain piece of functionality as an
object and to pass it as a parameter or the return value of a method--is a feature
present in many programming languages. It avoids the changing of an object state
and mutable data. The result of a function depends only on the input data, no matter
how many times it is called. This style makes the outcome more predictable, which
is the most attractive aspect of functional programming.

Its introduction to Java also allows you to improve parallel programming capabilities
in Java 8 by shifting the responsibility of parallelism from the client code to the
library. Before this, in order to process elements of Java collections, the client code
had to acquire an iterator from the collection and organize the processing of the
collection.


No comments:

Post a Comment