Question: The basic generic functional interface ________ in package java.util.function contains method test that takes a T argument and returns a boolean. Tests whether the T
The basic generic functional interface ________ in package java.util.function contains method test that takes a T argument and returns a boolean. Tests whether the T argument satisfies a condition.
| Consumer | ||
| Function | ||
| Supplier | ||
| Predicate |
1 points
QUESTION 14
Stream method ________ maps objects to double values and returns a DoubleStream. The method receives an object that implements the functional interface ToDoubleFunction (package java.util.function).
| doubleMap | ||
| toDouble | ||
| mapToDouble | ||
| toDoubleStream |
1 points
QUESTION 15
Collectors static method groupingBy with one argument receives a Function that classifies objects in the streamthe values returned by this function are used as the keys in a Map. The corresponding values, by default, are ________ containing the stream elements in a given category.
| Lists | ||
| Arrays | ||
| Strings | ||
| Collectors |
1 points
QUESTION 16
Functional interface BiConsumers accept method has two parameters. For Maps, the first represents the ________ and the second the corresponding ________.
| key, variable | ||
| lambda, value | ||
| lambda, variable | ||
| key, value |
1 points
QUESTION 17
Class Arrays ________ method is used to create a Stream from an array of objects.
| stream | ||
| arrayToStream | ||
| createStream | ||
| objectToStream |
1 points
QUESTION 18
An ________ (package java.util.stream) is a specialized stream for manipulating int values.
| StreamOfInt | ||
| IStream. | ||
| IntegerStream | ||
| IntStream |
1 points
QUESTION 19
The basic generic functional interface ________ in package java.util.function contains method get that takes no arguments and produces a value of type T. Often used to create a collection object in which a stream operations results are placed.
| Consumer | ||
| Function | ||
| Supplier | ||
| BinaryOperator |
1 points
QUESTION 20
The basic generic functional interface ________ in package java.util.function contains method accept that takes a T argument and returns void. Performs a task with its T argument, such as outputting the object, invoking a method of the object, etc.
| Consumer | ||
| Function | ||
| Supplier | ||
| BinaryOperator |
1 points
QUESTION 21
The basic generic functional interface ________ in package java.util.function contains method apply that takes two T arguments, performs an operation on them (such as a calculation) and returns a value of type T.
| Consumer | ||
| Function | ||
| Supplier | ||
| BinaryOperator |
1 points
QUESTION 22
By default, method sorted uses ________.
| ascending order | ||
| the natural order for the stream's element type | ||
| descending order | ||
| the order specified in a command-line argument |
1 points
QUESTION 23
Map method entrySet returns a Set of Map.Entry objects containing the Maps ________.
| values | ||
| keys | ||
| index | ||
| keyvalue pairs |
1 points
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
