1. Simple Use case: Get the list of Class name.
2. See below Code 1.
I want to learn/understand the mechanical of many things simultaneously.
I want to use Stream reduce method and not using lambda expression.
I used old way: Interface interface = new InterfaceImpl();
3. See below Log output with sequential .stream() and Log output with .parallelStream()
From log, I did not see the output from combiner BinaryOperator ft (with code using .stream())
By chance/accident not by design
, I switch from sequential stream() to parallelStream(),
I saw the output from combiner BinaryOperator ft.
But with sequential stream(), the end result is correct: Got a list of 2 class name.
With parallelStream, the end result is NOT correct: Got a list of 2 class name appeared twice (i.e a list of 4)
How to make sense of this? Can some one provide an explanation for stream().reduce vs parallelStream().reduce output?