Java tutorial
import java.util.Arrays; import java.util.List; public class Main { public static void main(String[] args) { List<Integer> numbers = Arrays.asList(1, 2, 3, 4, 5); double sum = numbers.parallelStream().reduce(0.0, (partialSum, a) -> partialSum + a, Double::sum); System.out.println(sum); } }