1
What is the output of the code:
Function<String, String> f1 = s -> s + "-f1-";
Function<String, String> f2 = s -> s + "-f2-";
Function<String, String> f3 = s -> s + "-f3-";
System.out.println(f1.andThen(f3).compose(f2).apply("Compose"));
System.out.println(f1.andThen(f2).andThen(f3).apply("AndThen"));
Please log in or register to have a possibility to add comment.