Question from the Java test

What is the output of the following Java code?

Waiting for validation

What is the output of the following code?

import java.util.function.Function;

public class LambdaTest {
    public static void main(String[] args) {
        Function<Integer, Integer> add = x -> x + 10;
        Function<Integer, Integer> multiply = x -> x * 2;
        
        System.out.println(add.andThen(multiply).apply(5));
        System.out.println(add.compose(multiply).apply(5));
    }
}
Author: ZiadStatus: Waiting for validationQuestion not yet passed
0
Community EvaluationsNo one has reviewed this question yet, be the first!