Question PRG-JAVA-0076
HardWhat happens when you call stream().map(...) without a terminal operation?
- A.
An exception is thrown
- B.
The list is changed
- C.
Sign up free to see the answer and a step-by-step explanation.
Popular companies
Prepare company by company
Hiring pattern, syllabus, past questions and mocks for each company.
All companiesPractice by subject
Java question
What happens when you call stream().map(...) without a terminal operation?
An exception is thrown
The list is changed
Sign up free to see the answer and a step-by-step explanation.
The map runs immediately
Nothing runs, because streams are lazy