Courseiva
Working with Streams and Lambda ExpressionshardMultiple SelectObjective-mapped

1Z0-829 Working with Streams and Lambda Expressions Practice Question

Which TWO statements are true about the Stream API and lambda expressions in Java 17?

⚠ Common exam trap

It's easy for candidates to confuse the lazy evaluation of intermediate operations with eager execution, or mistakenly believe a stream can be reused after a terminal operation, leading them to select options C or D.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

The Stream API does not modify the original data source.

The Stream API is designed to work on a view of the data, not the data itself. Operations like filter, map, and collect produce new streams or results without altering the original collection, array, or I/O source. This non-interference guarantee is a core principle of the Stream API, ensuring safe parallel execution and functional programming style.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • The Stream API does not modify the original data source.

    Why this is correct

    Streams operate on a view of the data; they do not modify the underlying collection or array.

  • Lambda expressions can capture variables that are effectively final.

    Why this is correct

    Lambda expressions can capture local variables that are effectively final, meaning they are not reassigned after initialization.

  • A stream can be consumed by multiple terminal operations sequentially.

    Why it's wrong here

    A stream can have at most one terminal operation; after that, the stream is consumed and cannot be used again.

  • Intermediate operations on a stream are executed eagerly.

    Why it's wrong here

    Intermediate operations are lazy; they are not executed until a terminal operation is invoked.

  • Lambda expressions introduce a new level of scope, similar to an anonymous inner class.

    Why it's wrong here

    Lambda expressions do not introduce a new scope; they share the scope with the enclosing method, so variables from the outer scope are accessible directly.

Quick reference

Cloud Service Model Comparison

ModelYou ManageProvider ManagesExamples
IaaSOS, runtime, apps, dataHardware, hypervisor, networkingEC2, Azure VMs, GCP Compute Engine
PaaSApps and dataOS, runtime, middleware, hardwareElastic Beanstalk, Azure App Service
SaaSData and settings onlyEverything elseMicrosoft 365, Salesforce, Workday
FaaS / ServerlessFunction code onlyInfra, scaling, runtimeLambda, Azure Functions, Cloud Run
CaaSContainers and appsKubernetes, OS, hardwareEKS, AKS, GKE

About these practice questions

This 1Z0-829 question is part of Courseiva's 513-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This 1Z0-829 practice question is part of Courseiva's free Oracle certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the 1Z0-829 exam.