Think Constructive

What is the output of the below code snippet?

public class PeekExample {
public static void main(String args[])
{
Stream.of("one", "two", "three", "four")
.filter(e -> e.length() > 4)
.peek(e -> System.out.println("Filtered value: " + e))
.map(e -> e.toUpperCase())//String::toUpperCase)
.peek(e -> System.out.println("Mapped value: " + e))
.collect(Collectors.toList());
}
}

#softwaredeveloper #softwareengineer #thinkconstructive #eshapuri #javadeveloperinterview #codinginterview #javainterviewquestion #code #coding #javacollections #javacollectors #javastreams

1 month ago | [YT] | 15