Search Header Logo

quiz2

Authored by sarala vinayagam

Computers

University

Used 1+ times

quiz2
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

15 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 3 pts

Which of the following is NOT a characteristic of Java Streams?

Option_a: Immutable


Option_b: Lazy evaluation

Option_c: Parallelizable

Option_d: Modifiable

2.

MULTIPLE CHOICE QUESTION

30 sec • 3 pts

Which method is used to create a sequential stream from a collection in Java?

Option_a: Stream.of()


Option_b: stream()

Option_c: parallelStream()


Option_d: toStream()

3.

MULTIPLE CHOICE QUESTION

30 sec • 3 pts

In a Stream pipeline, which operation must be terminal?

Option_a: filter()



Option_b: map()

Option_c: reduce()

Option_d: flatMap()

4.

MULTIPLE CHOICE QUESTION

30 sec • 3 pts

Which functional interface is used for the filter operation in a Stream pipeline?

Option_a: Consumer


Option_b: Predicate

Option_c: Supplier

Option_d: Function

5.

MULTIPLE CHOICE QUESTION

30 sec • 3 pts

Which of these is a primitive variant of the Consumer functional interface?

Option_a: IntFunction



Option_b: IntSupplier

Option_c: IntConsumer

Option_d: IntPredicate

6.

MULTIPLE CHOICE QUESTION

30 sec • 3 pts

What does the BiFunction interface represent?

Option_a: A function that takes one argument and returns a result




Option_b: A function that takes two arguments and returns a result

Option_c: A function that takes three arguments and returns a result

Option_d: A function that takes two arguments and returns no result

7.

MULTIPLE CHOICE QUESTION

30 sec • 3 pts

Which stream operation is used to perform filtering of elements?

Option_a: filter()


Option_b: map()

Option_c: collect()

Option_d: reduce()

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?