Question
The intermediate Stream operation ________ results in a stream containing only the unique elements. distinct map filter limit 1 points QUESTION 34 ________ is a
The intermediate Stream operation ________ results in a stream containing only the unique elements.
distinct | ||
map | ||
filter | ||
limit |
1 points
QUESTION 34
________ is a method reference for an instance method of a class. It creates a one-parameter lambda that invokes the instance method on the lambdas argument and returns the methods result.
Math::sqrt | ||
System.out::println | ||
TreeMap::new | ||
String::toUpperCase |
1 points
QUESTION 35
________ is a constructor reference. It creates a lambda that invokes the no-argument constructor of the specified class to create and initialize a new object of that class.
Math::sqrt | ||
System.out::println | ||
TreeMap::new | ||
String::toUpperCase |
1 points
QUESTION 36
You can define your own reductions for an IntStream by calling its ________ method. The first argument is a value that helps you begin the reduction operation and the second argument is an object that implements the IntBinaryOperator functional interface.
reduction. | ||
lessen | ||
trim | ||
reduce |
1 points
QUESTION 37
You can declare that an interface is a functional interface by preceding it with the @FunctionalInterface annotation. The compiler will then ensure that the interface contains ________; otherwise, itll generate a compilation error.
no abstract methods | ||
all abstract methods | ||
only one abstract method | ||
one or more abstract methods. |
1 points
QUESTION 38
The basic generic functional interface ________ in package java.util.function contains method get that takes no arguments and returns a value of type T.
UnaryOperator | ||
Function | ||
Supplier | ||
BinaryOperator |
1 points
QUESTION 39
Intermediate Stream operation ________ results in a stream with the specified number of elements from the beginning of the original stream.
distinct | ||
map | ||
filter | ||
limit |
1 points
QUESTION 40
IntStream method ________performs the count, min, max, sum and average operations in one pass of an IntStreams elements and returns the results as an IntSummaryStatistics object (package java.util).
allStatistics. | ||
completeStatistics. | ||
entireStatistics. | ||
summaryStatistics |
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started