Choose the correct option based on this code segment:
List<Integer> ints = Arrays.asList(1, 2, 3, 4, 5);
ints.removeIf(i -> (i % 2 ==0)); // LINE
System.out.println(ints);
d)
the underlying List object returned by Arrays.asList()
method is a fixed-size list and hence we cannot remove elements from that list.
hence calling removeIf()
method on this list results in throwing an UnsupportedOperationException.