Using NetBeans 8 but getting below compilation error for Lambda expression

前端 未结 4 944
情歌与酒
情歌与酒 2020-12-20 12:52

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         


        
4条回答
  •  一整个雨季
    2020-12-20 13:30

    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.

提交回复
热议问题