12
What is the output of the following program?
public class Main {
public static void main(String[] args) {
java.util.function.Function<Integer, Integer> add1 = x -> x + 1;
java.util.function.Function<Integer, Integer> dbl = x -> x * 2;
System.out.println(add1.andThen(dbl).apply(5));
}
}Medium