Question 4
Consider the following Java code.
import java.util.*;import java.util.stream.*;
public class StreamTest { public static void main(String[] args) { List<String> words = Arrays.asList("apple", "banana", "pear", "kiwi", "plum");
words.stream() .filter(w -> w.length() > 4) .map(w -> w.toUpperCase()) .skip(1) .forEach(System.out::println); }}What will the output be?
APPLE
BANANABANANA
APPLE
KIWI
PLUM