Exam 17: Lambdas

arrow
  • Select Tags
search iconSearch Question
flashcardsStudy Flashcards
  • Select Tags

________ is a method reference for an instance method of a class.It creates a one-parameter lambda that invokes the instance method on the lambda's argument and returns the method's result.

Free
(Multiple Choice)
4.8/5
(34)
Correct Answer:
Verified

D

The intermediate Stream operation ________ results in a stream containing only the unique elements.

Free
(Multiple Choice)
4.8/5
(32)
Correct Answer:
Verified

A

Terminal operations are eager;they perform the requested operation when they are called.

Free
(Multiple Choice)
4.8/5
(28)
Correct Answer:
Verified

D

Which of the following statements is false?

(Multiple Choice)
4.8/5
(35)

Which of the following statements is false?

(Multiple Choice)
4.8/5
(36)

Which of the following statements is false?

(Multiple Choice)
4.8/5
(38)

Stream method findFirst is a short-circuiting terminal operation that processes the stream pipeline and terminates processing as soon as the first object from the stream pipeline is found.The method returns a(n)________ containing the object that was found,if any.

(Multiple Choice)
4.8/5
(31)

________ is s method reference for a static method of a class.It creates a one-parameter lambda in which the lambda's argument is passed to the specified a static method and the lambda returns the method's result.

(Multiple Choice)
4.8/5
(35)

Which of the following statements is false?

(Multiple Choice)
4.9/5
(35)

The new language and library capabilities that support functional programming were added to Java as part of Project ________.

(Multiple Choice)
4.9/5
(37)

Functional interface BiConsumer's accept method has two parameters.For Maps,the first represents the ________ and the second the corresponding ________.

(Multiple Choice)
4.7/5
(33)

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.

(Multiple Choice)
5.0/5
(33)

Which of the following statements is false?

(Multiple Choice)
4.7/5
(32)

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 operation's results are placed.

(Multiple Choice)
4.9/5
(41)

Class Arrays provides ________ stream methods for creating IntStreams,LongStreams and DoubleStreams from int,long and double arrays or from ranges of elements in the arrays.

(Multiple Choice)
4.9/5
(36)

A lambda expression represents a(n)________ method-a shorthand notation for implementing a functional interface.

(Multiple Choice)
4.8/5
(43)

Map method ________ performs an operation on each key-value pair.

(Multiple Choice)
4.9/5
(37)

By default,method sorted uses ________.

(Multiple Choice)
4.9/5
(32)

Collectors static method groupingBy with two arguments receives a Function that classifies the objects in the stream and another Collector (known as the ________ Collector).

(Multiple Choice)
4.7/5
(32)

Which of the following statements is false?

(Multiple Choice)
4.8/5
(33)
Showing 1 - 20 of 60
close modal

Filters

  • Essay(0)
  • Multiple Choice(0)
  • Short Answer(0)
  • True False(0)
  • Matching(0)