The Stream API lets you process collections using a pipeline of operations instead of writing manual loops. You chain methods like filter, map, and collect to describe what you want, and Java figures out how to execute it.
Here is an example that filters and transforms a list:
List<String> names = List.of("Alice", "Bob", "Charlie", "Dave");
List<String> result = names.stream()
.filter(name -> name.length() > 3)
.map(String::toUpperCase)
.collect(Collectors.toList());
// result: [ALICE, CHARLIE, DAVE]
Streams are lazy. No computation happens until a terminal operation like collect() or forEach() triggers it. This means chaining operations doesn't create intermediate lists.