Exam 17: Lambdas
Exam 1: Introduction to Computers and Java44 Questions
Exam 2: Introduction to Java Applications34 Questions
Exam 3: Control Statements39 Questions
Exam 4: Control Statements27 Questions
Exam 5: Methods36 Questions
Exam 6: Arrays and Arraylists48 Questions
Exam 7: Introduction to Classes and Objects27 Questions
Exam 8: Classes and Objects: a Deeper Look27 Questions
Exam 9: Object Oriented Programming: Inheritance22 Questions
Exam 10: Object-Oriented Programming: Polymorphism30 Questions
Exam 11: Exception Handling27 Questions
Exam 12: Gui Components78 Questions
Exam 13: Graphics and Java 2D19 Questions
Exam 14: Fundamentals of Characters and Strings26 Questions
Exam 15: Files, Streams and Object Serialization26 Questions
Exam 16: Generic Collections41 Questions
Exam 17: Lambdas60 Questions
Exam 18: Recursion15 Questions
Exam 19: Searching, Sorting and Big O21 Questions
Exam 20: Generic Classes and Methods15 Questions
Exam 21: Custom Generic Data Structures17 Questions
Exam 22: GUI26 Questions
Exam 23: Concurrency54 Questions
Exam 24: Accessing Databases With JDBC35 Questions
Exam 25: JavaFX26 Questions
Select questions type
Which of the following statements is false?
Free
(Multiple Choice)
4.8/5
(37)
Correct Answer:
B
Stream mutable reduction operation ________creates an array containing the results of the stream's prior operations.
Free
(Multiple Choice)
4.7/5
(45)
Correct Answer:
C
________ 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.9/5
(36)
Correct Answer:
D
Functional interface Comparator's default method ________ reverses an existing Comparator's ordering.
(Multiple Choice)
4.7/5
(39)
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)
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.
(Multiple Choice)
4.8/5
(36)
An ________ (package java.util.stream) is a specialized stream for manipulating int values.
(Multiple Choice)
4.9/5
(36)
Terminal Stream operation ________ performs processing on every element in a stream (e.g., display each element).
(Multiple Choice)
4.9/5
(45)
Intermediate operations are________; they aren't performed until a terminal operation is invoked. This allows library developers to optimize stream-processing performance.
(Multiple Choice)
4.8/5
(36)
________ 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.
(Multiple Choice)
4.9/5
(37)
Which statement in the following sequence of statements about sorting objects by two fields is false?
(Multiple Choice)
4.9/5
(45)
Functional interface BiConsumer's accept method has two parameters. For Maps, the first represents the ________ and the second the corresponding ________.
(Multiple Choice)
4.8/5
(42)
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
(41)
A lambda expression represents a(n) ________ method-a shorthand notation for implementing a functional interface.
(Multiple Choice)
4.9/5
(40)
Map method entrySet returns a Set of Map.Entry objects containing the Map's ________.
(Multiple Choice)
4.8/5
(34)
The type of a lambda is the type of the ________ that the lambda implements.
(Multiple Choice)
4.7/5
(35)
What is the meaning of ( ) in the following lambda?
() -> System.out.println("Welcome to lambdas!")
(Multiple Choice)
5.0/5
(37)
Showing 1 - 20 of 60
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)