IDEA编译报错,jdk设置问题,查看pom中的编译版本(如果是maven项目的话)
1、查看项目的jdk(Ctrl+Alt+shift+S)
File ->Project Structure->Project Settings ->Project
2、查看模块的jdk(Ctrl+Alt+shift+S)
File ->Project Structure->Project Settings -> Modules -> (需要修改的模块) -> Sources ->
3、查看idea中Java编译配置
File ->Setting ->Build,Execution,Deployment -> Compiler -> Java Compiler
4、清除 IDEA 缓存 重启 IDEA
File->Invalidate Caches/Restart