File -> Project Structure -> Project Settings>>Project>Project language  应与JDK吻合  

 

File -> Project Structure -> Project Settings>>Modules>Modules language

 


 File -> Settings -> Compiler -> Java Compiler -> Target bytecode version