I just updated my NetBeans from 8.0 to 8.0.1 and my JDK from 1.8.0 to 1.8.0u20. I guess most likely my problem is caused by the jdk-update.
Before the updates I was able to compile this line of code:
int sum = myIntegerList.stream().reduce(0, (a, b) -> a + b, (c, d) -> c + d);
Right now this wont compile any longer. NetBeans tells me that the "main class could not be found or loaded".
Now I have to write it like this:
Integer sum = myIntegerList.stream().reduce(0, (a, b) -> a + b, (c, d) -> c + d);
or
int sum = (int) myIntegerList.stream().reduce(0, (a, b) -> a + b, (c, d) -> c + d);
or
int sum = myIntegerList.stream().reduce(0, (Integer a, Integer b) -> a + b, (Integer c, Integer d) -> c + d);
Does anyone know why this doesn't work any longer? Am I doing something wrong?