Core Java theorytheory 0/50 · 0%
Streams · medium

33. Stream: collect()

Gathering results into a collection.

The collect() terminal operation gathers stream elements into a List, Set, or Map.

Check your understanding

  1. 1. Utility class for collectors?

  2. 2. Turn stream to list?