Question 10
Consider the Java code given below
import java.util.*;import java.util.stream.*;public class CollectResTest { public static void main(String[] args) { var list=new ArrayList<String>(); list.add(null); list.add("ODI"); list.add(null); list.add("RANJI"); list.add("TEST"); list.add("TEST"); list.add("RANJI"); list.add("ODI");
//CODE BLOCK
System.out.println(obj); }}Choose the correct option to be filled in place of CODE BLOCK so that the program generates the output:
[ODI, RANJI, TEST]