Exam 17: Lambdas and Streams

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

Which of the following statements is false?

(Multiple Choice)
4.8/5
(79)

Which of the following statements is false?

(Multiple Choice)
4.9/5
(70)

IntStream method ________ (a terminal operation) performs a task on each stream element.

(Multiple Choice)
4.8/5
(73)

________ is an intermediate operation that transforms a stream's elements to new values and produces a stream containing the resulting (possibly different type) elements.

(Multiple Choice)
4.7/5
(78)

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)
4.9/5
(75)

Which of the following statements is false?

(Multiple Choice)
4.8/5
(85)

Intermediate Stream operation ________ results in a stream with the specified number of elements from the beginning of the original stream.

(Multiple Choice)
4.8/5
(72)

Which of the following statements is false?

(Multiple Choice)
4.7/5
(75)

Which of the following statements is false?

(Multiple Choice)
4.9/5
(72)

Which of the following statements is false?

(Multiple Choice)
4.8/5
(75)

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, it'll generate a compilation error.

(Multiple Choice)
4.7/5
(90)

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.7/5
(82)

Functional interface Comparator's default method ________ reverses an existing Comparator's ordering.

(Multiple Choice)
5.0/5
(78)

The basic generic functional interface ________ in package java.util.function contains method get that takes no arguments and returns a value of type T.

(Multiple Choice)
4.9/5
(67)

Collectors static method groupingBy with one argument receives a Function that classifies objects in the stream-the 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.

(Multiple Choice)
4.8/5
(89)

Which of the following statements is false?

(Multiple Choice)
4.9/5
(88)

Stream method ________ eliminates duplicate objects in a stream.

(Multiple Choice)
4.9/5
(77)

Which of the following statements is false?

(Multiple Choice)
4.9/5
(65)

The type of a lambda is the type of the ________ that the lambda implements.

(Multiple Choice)
4.9/5
(83)

The intermediate Stream operation ________ results in a stream containing only the elements that satisfy a condition.

(Multiple Choice)
4.9/5
(83)
Showing 41 - 60 of 67
close modal

Filters

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