100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.2 TrustPilot
logo-home
Exam (elaborations)

Java Exam CH. 17 UPDATED ACTUAL Exam Questions and CORRECT Answers

Rating
-
Sold
-
Pages
19
Uploaded on
24-06-2025
Written in
2024/2025

Java Exam CH. 17 UPDATED ACTUAL Exam Questions and CORRECT Answers

Institution
JAVA
Course
JAVA










Whoops! We can’t load your doc right now. Try again or contact support.

Written for

Institution
JAVA
Course
JAVA

Document information

Uploaded on
June 24, 2025
Number of pages
19
Written in
2024/2025
Type
Exam (elaborations)
Contains
Unknown

Subjects

Content preview

Java Exam CH. 17 UPDATED ACTUAL Exam Questions and
CORRECT Answers


Which of the following statements is false?

a. Functional interfaces are also known as single abstract method (SAM) interfaces.
b. Package java.util.function contains six basic functional interfaces BinaryOperator, Consumer,
Function, Predicate, Supplier and UnaryOperator.

c. There are many specialized versions of the six basic functional interfaces for use with int, long
and double primitive values. There are also generic customizations of Consumer, Function and
Predicate for binary operations—that is, methods that take two arguments.

d. All of these statements are true - All of these statements are true


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.

a. Consumer<T>

b. Function<T,R>
c. Supplier<T>

d. BinaryOperator<T> - d. BinaryOperator<T>


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.

a. Consumer<T>

b. Function<T,R>

c. Supplier<T>

d. BinaryOperator<T> - a. Consumer<T>

,The basic generic functional interface ________ in package java.util.function contains method
apply that takes a T argument and returns a value of type R. Calls a method on the T argument
and returns that method's result.

a. Consumer<T>

b. Function<T,R>

c. Supplier<T>

d. BinaryOperator<T> - b. Function<T,R>



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.

a. Consumer<T>

b. Function<T,R>

c. Supplier<T>
d. Predicate<T> - d. Predicate<T>



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.
a. Consumer<T>

b. Function<T,R>

c. Supplier<T>

d. BinaryOperator<T> - c. Supplier<T>



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

a. UnaryOperator<T>

b. Function<T,R>
c. Supplier<T>

, d. BinaryOperator<T> - a. UnaryOperator<T>



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

a. functional

b. unnamed

c. undesignated
d. anonymous - d. anonymous



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

a. anonymous class

b. functional interface

c. stream

d. collection - b. functional interface


Which of the following statements is false?

a. Lambda expressions can be used anywhere functional interfaces are expected.

b. A lambda consists of a parameter list followed by the arrow token and a body, as in:

[parameterList] -> {statements}

c.Method references are specialized shorthand forms of lambdas.

d. Each of the above statements is true - b. A lambda consists of a parameter list followed by the
arrow token and a body, as in:

[parameterList] -> {statements}

Actually, a lambda consists of a parameter list followed by the arrow token and a body, as in:
(parameterList) -> {statements}



Which of the following statements is false?
a. A lambda that receives two ints, x and y, and returns their sum is
$12.99
Get access to the full document:

100% satisfaction guarantee
Immediately available after payment
Both online and in PDF
No strings attached

Get to know the seller
Seller avatar
GradeVaultAcademy

Also available in package deal

Thumbnail
Package deal
JAVA Bundled Exam Questions WITH CORRECT Answer
-
36 2025
$ 467.64 More info

Get to know the seller

Seller avatar
GradeVaultAcademy Havard School
View profile
Follow You need to be logged in order to follow users or courses
Sold
2
Member since
6 months
Number of followers
0
Documents
841
Last sold
4 months ago
GradeVault Academy.

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Frequently asked questions