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
Grade
A+
Uploaded on
17-04-2025
Written in
2024/2025

Java Exam CH. 17 UPDATED ACTUAL Exam Questions and CORRECT Answers Prior to Java SE 8, Java supported three programming paradigms. Java SE 8 adds ________. a. procedural programming b. object-oriented programming c. generic programming d. functional programming. - CORRECT ANSWER - d. functional programming The new language and library capabilities that support functional programming were added to Java as part of Project ________. a. Utilitarian b. Upsilon c. Lambda d. Utility - CORRECT ANSWER - c. Lambda

Show more Read less
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
April 17, 2025
Number of pages
19
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

Content preview

Java Exam CH. 17 UPDATED ACTUAL
Exam Questions and CORRECT Answers
Prior to Java SE 8, Java supported three programming paradigms. Java SE 8 adds ________.
a. procedural programming
b. object-oriented programming
c. generic programming

d. functional programming. - CORRECT ANSWER - d. functional programming


The new language and library capabilities that support functional programming were added to
Java as part of Project ________.
a. Utilitarian
b. Upsilon
c. Lambda

d. Utility - CORRECT ANSWER - c. Lambda


Which of the following statements is false?
a. Prior to functional programming, you typically determined what you wanted to accomplish,
then specified the precise steps to accomplish that task.
b. Using a loop to iterate over a collection of elements is known as external iteration and requires
accessing the elements sequentially. Such iteration also requires mutable variables. External
iteration is easier to parallelize.
c. Letting the library determine how to iterate over a collection of elements is known as internal
iteration.
d. Functional programming focuses on immutability—not modifying the data source being
processed or any other program state - CORRECT ANSWER - b. Using a loop to iterate
over a collection of elements is known as external iteration and requires accessing the elements
sequentially. Such iteration also requires mutable variables. External iteration is easier to
parallelize. Actually, internal iteration is easier to parallelize.


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 - CORRECT ANSWER - 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> - CORRECT ANSWER - 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> - CORRECT ANSWER - 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> - CORRECT ANSWER - 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> - CORRECT ANSWER - 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> - CORRECT ANSWER - 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> - CORRECT ANSWER - 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 - CORRECT ANSWER - d. anonymous

Get to know the seller

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
MGRADES Stanford University
View profile
Follow You need to be logged in order to follow users or courses
Sold
1063
Member since
1 year
Number of followers
102
Documents
68976
Last sold
3 hours ago
MGRADES (Stanford Top Brains)

Welcome to MGRADES Exams, practices and Study materials Just think of me as the plug you will refer to your friends Me and my team will always make sure you get the best value from the exams markets. I offer the best study and exam materials for a wide range of courses and units. Make your study sessions more efficient and effective. Dive in and discover all you need to excel in your academic journey!

3.8

168 reviews

5
73
4
30
3
43
2
8
1
14

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