Oracle 1z0-830 Question Answer
Which two of the following aren't the correct ways to create a Stream?
Stream stream = Stream.of("a");
Stream stream = Stream.ofNullable("a");
Stream stream = Stream.generate(() -> "a");
Stream stream = Stream.of();
Stream stream = new Stream();
Stream stream = Stream.builder().add("a").build();
Stream stream = Stream.empty();
In Java, the Stream API provides several methods to create streams. However, not all approaches are valid.
TESTED 07 Jul 2025
Copyright © 2014-2025 ACE4Sure. All Rights Reserved