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

Which of the following statements is false?

(Multiple Choice)
4.8/5
(37)

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

(Multiple Choice)
4.8/5
(36)

________ 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
(31)

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
(38)

Which of the following statements is false?

(Multiple Choice)
4.8/5
(43)

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
(34)

Which of the following statements is false?

(Multiple Choice)
4.8/5
(39)

Which of the following statements is false?

(Multiple Choice)
4.9/5
(38)

Which of the following statements is false?

(Multiple Choice)
4.8/5
(30)

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
(42)

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
(44)

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

(Multiple Choice)
5.0/5
(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.

(Multiple Choice)
4.9/5
(28)

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
(39)

Which of the following statements is false?

(Multiple Choice)
4.8/5
(39)

Stream method ________ eliminates duplicate objects in a stream.

(Multiple Choice)
4.8/5
(32)

Which of the following statements is false?

(Multiple Choice)
4.9/5
(34)

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

(Multiple Choice)
5.0/5
(35)

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

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

Filters

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