Even though I changed my netbeans project's jdk to 1.8, it still gives the following error
lambda expressions not expected here
lambda expressions are not supported in-source 1.7
(use source 8 or higher to enable lambda expressions)
Any help is so much appreciated
You have to set the project properties for the target version. Java 8 allows you to build for Java 7 execution, and that setting is still there from when you used Java 7. Right-click on the Project in the "Projects" window and select "Properties", then "Sources" in that dialog. On the right you will see "Source/Binary Format". Change that to "1.8", then click "OK".
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With