Step by step learning
What is the output of the code?
Consumer<String> first = t -> System.out.println(t.toUpperCase()); Consumer<String> second = t -> System.out.println(t.toLowerCase()); first.andThen(second).accept("Hello world");
hello world HELLO WORLD
HELLO WORLD hello world
Please log in or register to have a possibility to add comment.
Please log in or register to have a possibility to add comment.