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
Download JDK 1.8 to resolve this issue. change the JAVA_HOME environment variables path to jdk_1.8. Right Click on the project folder which has the above mentioned compilation error and select properties. In Sources tab change the source/binary format to JDK 8. In libraries change Java Platform to JDK 1.8.