Fill in the blank so this code outputs three lines:
List<String> list = new ArrayList<>(); list.add("A"); list.add("B"); list.add("C"); list.stream().filter(___).forEach(System.out::println);
A. String::isEmpty B. ! String::isEmpty C. String::! isEmpty D. None of the above
D.
Option A is the only one of the three options to compile.
However, it results in no lines being output since none of the three strings are empty.
Options B and C do not even compile because a method reference cannot have an operator next to it.
Therefore, Option D is correct.