I am using NetBeans 8. When my code contains a Lambda expression and I try to compile, I get the following error message:
lambda expression not expected here lam
In the project properties dialog, select Sources in the left panel and then on the bottom right look for "Source/Binary Format" Change that to JDK 8.