Hackforge Academy

Category: React • Beginner

Published on 24 Feb 2026

Explanation

#white-Stream is used to process collections in #white-functional style.

Code Example

List<Integer> list = Arrays.asList(1,2,3);

Explanation

#white-filter() is used to filter elements.

Code Example

list.stream()
.filter(n -> n>1)
.forEach(System.out::println);

Explanation

#white-map() transforms elements.

Code Example

list.stream()
.map(n -> n*2)
.forEach(System.out::println);

Explanation

#white-collect() gathers stream results into a #white-collection.

Code Example

List<Integer> result = 
list.stream().collect(Collectors.toList());

Explanation

#white-reduce() performs aggregation operations.

Code Example

int sum = list.stream().reduce(0,(a,b)->a+b);

Want structured learning with real projects?

Join our Weekend Live Workshop and become job-ready faster.