1Z0-829 Working with Streams and Lambda Expressions • Set 3
1Z0-829 Working with Streams and Lambda Expressions Practice Test 3 — 15 questions with explanations. Free, no signup.
A company uses a large dataset of customer orders. They want to compute statistics: total orders, average amount, and maximum amount per city. They write: Map<String, IntSummaryStatistics> stats = orders.stream() .collect(Collectors.groupingBy(Order::getCity, Collectors.summarizingInt(Order::getAmount))); The code works but is slower than expected when run on a large dataset. They suspect the grouping operation is not taking advantage of parallelism. They want to improve performance by making the collector concurrent. Which change is correct?
Choose an answer to begin — your selection is scored in the full session.
15 questions · instant feedback and full explanations after every question.