• Wrong document? Swap it for free
  • Written by students who passed
  • Immediately available after payment
  • Read online or as PDF
Sell
Where do you study
Your language
Document preview thumbnail
Preview 4 out of 34 pages
Exam (elaborations)

Java Programming – 100+ Exam Q&A on Streams, Lambdas, Functional Interfaces – CH.17 – CS101 – 2025/2026

Document preview thumbnail
Preview 4 out of 34 pages

This document features 100+ solved multiple-choice questions with correct answers from Chapter 17 of the Intro to Java Programming (CS101) course, tailored for the 2025/2026 academic year. It is a high-value revision tool for first-year students in Computer Science, Software Engineering, and IT who are preparing for Java exams focused on functional programming and modern Java features introduced in Java SE 8 and beyond. Each question includes a verified correct answer and often includes clarification or explanation, making it ideal for exam simulations, quick revision, or concept reinforcement. The question style mimics real exam scenarios and highlights both theoretical and practical Java use cases. Covered topics include: Functional Programming in Java: support added in Java SE 8, Project Lambda Lambda Expressions: syntax, usage rules, anonymous functions, shorthand formats Functional Interfaces: Consumer, Supplier, Function, Predicate, BinaryOperator, UnaryOperator, BiConsumer, IntPredicate, and custom interfaces Stream API (m): intermediate vs terminal operations, lazy evaluation, short-circuiting, map, filter, reduce, collect, groupingBy IntStream & Primitive Streams: stream creation for int, long, double values; boxed streams Collectors: collecting results into lists, maps, counting, grouping, and mapping Method References: types and examples (constructor, instance, static method references) SecureRandom & Random Streams: generating and manipulating infinite random streams Common Pitfalls & False Statements: exam-style identification of incorrect claims Comparator & Sorting Logic: Cring, thenComparing, reversing comparators Stream Transformation: mapping, flattening, and reduction techniques This document is structured for: CS101 and Java Foundations students preparing for functional programming sections University learners facing open-book Java assessments or online quizzes Students targeting Oracle Java certification (OCAJP) Bootcamp participants learning modern Java (Java 8+) streams and lambdas Tutors building advanced practice sets based on Chapter 17 content It delivers deep, code-relevant insight into Java's evolution toward functional programming, making it an excellent guide for students aiming to master new-generation Java features. Keywords: Java Chapter 17, Java functional programming, Java lambdas, Java streams, Stream API, Java 8 features, functional interfaces, Java map reduce, lambda syntax, Java predicate, ion, Java stream terminal operation, IntStream, BiConsumer, Java collect, CS101 functional Java

Content preview

Java Exam CH. 17 2025/2026 Exam
Questions and Answers 100%
Guaranteed Success | Already Rated A+



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. - 🧠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 - 🧠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 - 🧠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 - 🧠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>


3
COPYRIGHT©JOSHCLAY 2025/2026. YEAR PUBLISHED 2025. COMPANY REGISTRATION NUMBER: 619652435. TERMS OF USE. PRIVACY
STATEMENT. ALL RIGHTS RESERVED

, d. BinaryOperator<T> - 🧠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> - 🧠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> - 🧠ANSWER ✔✔b. Function<T,R>

Document information

Uploaded on
September 29, 2025
Number of pages
34
Written in
2025/2026
Type
Exam (elaborations)
Contains
Questions & answers
$15.99

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

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.
JOSHCLAY
3.6
(87)
Sold
405
Followers
16
Items
20795
Last sold
11 hours ago



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

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions