1Z0-829 • Practice Test 18
Free 1Z0-829 practice test — 15 questions with explanations. Set 18. No signup required.
What is the result of executing this code?
Refer to the exhibit.
```java
import java.util.*;
import java.util.stream.*;
public class Test {
public static void main(String[] args) {
List<String> list = List.of("a", "b", "c");
var result = list.stream()
.filter(s -> s.startsWith("b"))
.collect(Collectors.toUnmodifiableList());
result.add("d");
System.out.println(result);
}
}
```