lambda expressions are not supported at language level '5'

使用IDEA配置JDK1.8版本使用lambda表达式报错:
lambda expressions are not supported at language level '5'_第1张图片
解决办法如下:

  1. 在“File -> Settings -> Build, Execution, Deployment -> Compiler”中找到“Java Compiler”,更改“Project bytecode version”和“Target bytecode version”。lambda expressions are not supported at language level '5'_第2张图片
  2. 在“File -> Project Structure -> Project”中更改“Project SDK”和“Project Language level”lambda expressions are not supported at language level '5'_第3张图片
  3. 在“File -> Project Structure -> Modules”中更改“Language level”。lambda expressions are not supported at language level '5'_第4张图片

你可能感兴趣的:(开发工具)