Oracle Java SE 21 Developer Professional 1z0-830 Question # 17 Topic 2 Discussion

Oracle Java SE 21 Developer Professional 1z0-830 Question # 17 Topic 2 Discussion

1z0-830 Exam Topic 2 Question 17 Discussion:
Question #: 17
Topic #: 2

Given:

java

List integers = List.of(0, 1, 2);

integers.stream()

.peek(System.out::print)

.limit(2)

.forEach(i -> {});

What is the output of the given code fragment?


A.

Compilation fails


B.

An exception is thrown


C.

01


D.

012


E.

Nothing


Get Premium 1z0-830 Questions

Contribute your Thoughts:


Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.