Тест · Лямбды и Stream API · урок 4 из 12
Тест — andThen
Что выведет программа?
import java.util.function.Function;
public class Main {
public static void main(String[] args) {
Function<Integer, Integer> f = x -> x + 1;
Function<Integer, Integer> g = x -> x * 2;
System.out.println(f.andThen(g).apply(3));
}
}