Lamda Static Function Call Java

Lamda Static Function Call Java

The Function interface is defined in java.util.function package and it has only one method apply with the following signature:

public R apply(T t){ }

It takes a generic class T and returns a generic class R. In this example you will how to create static Function which takes List of Integer and add all integer value then return it.

  • FunctionStaticTest.java:

  • Output:

Lamda Static Function Call Java

  • For more information please visit Oracle documentation here

Leave a Reply

Your email address will not be published. Required fields are marked *