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 lambda expressions are not supported in -source 1.5 (use -source 8 or higher to enable lambda expressions) ---- (Alt-Enter shows hints)
Please click right from you project -> Properties -> Choose Sources -> (you will see Source/Binary Format) change it to 1.8 -> Click OK.
Or you can see in this link http://tinadev.blogspot.com/2015/08/lambda-expression-not-expected-here.html
Thanks