100% tevredenheidsgarantie Direct beschikbaar na je betaling Lees online óf als PDF Geen vaste maandelijkse kosten 4,6 TrustPilot
logo-home
Tentamen (uitwerkingen)

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

Beoordeling
-
Verkocht
-
Pagina's
19
Geüpload op
24-06-2025
Geschreven in
2024/2025

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

Instelling
JAVA
Vak
JAVA

Voorbeeld van de inhoud

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

Geschreven voor

Instelling
JAVA
Vak
JAVA

Documentinformatie

Geüpload op
24 juni 2025
Aantal pagina's
19
Geschreven in
2024/2025
Type
Tentamen (uitwerkingen)
Bevat
Onbekend

Onderwerpen

€11,77
Krijg toegang tot het volledige document:

100% tevredenheidsgarantie
Direct beschikbaar na je betaling
Lees online óf als PDF
Geen vaste maandelijkse kosten

Maak kennis met de verkoper
Seller avatar
GradeVaultAcademy

Ook beschikbaar in voordeelbundel

Maak kennis met de verkoper

Seller avatar
GradeVaultAcademy Havard School
Volgen Je moet ingelogd zijn om studenten of vakken te kunnen volgen
Verkocht
2
Lid sinds
8 maanden
Aantal volgers
0
Documenten
841
Laatst verkocht
6 maanden geleden
GradeVault Academy.

0,0

0 beoordelingen

5
0
4
0
3
0
2
0
1
0

Recent door jou bekeken

Waarom studenten kiezen voor Stuvia

Gemaakt door medestudenten, geverifieerd door reviews

Kwaliteit die je kunt vertrouwen: geschreven door studenten die slaagden en beoordeeld door anderen die dit document gebruikten.

Niet tevreden? Kies een ander document

Geen zorgen! Je kunt voor hetzelfde geld direct een ander document kiezen dat beter past bij wat je zoekt.

Betaal zoals je wilt, start meteen met leren

Geen abonnement, geen verplichtingen. Betaal zoals je gewend bent via iDeal of creditcard en download je PDF-document meteen.

Student with book image

“Gekocht, gedownload en geslaagd. Zo makkelijk kan het dus zijn.”

Alisha Student

Veelgestelde vragen