I really want to know the exact difference between Stream.reduce() and Stream.parallel.reduce()
To clear everything I created a small program and found that result is not equal with same values .
public class Test {
public static void main(String[] args) {
int a = Stream.of(1, 2, 3).map(i -> i * 10).reduce(5, (abc, cde) -> abc + cde);
int b = Stream.of(1, 2, 3).map(i -> i * 10).
parallel().reduce(5, (abc, cde) -> abc + cde);
System.out.println(a == b) //False;
}
}
So, does this means that they both are different if so please help me understand how they are different in functionality wise ?