What is Project Language level in IntelliJ IDEA?

后端 未结 3 721
旧时难觅i
旧时难觅i 2020-12-02 15:05

I am using Java 7 SDK and IntelliJ IDEA IDE.

java version \"1.7.0_11\"
Java(TM) SE Runtime Environment (build 1.7.0_11-b21)
Java HotSpot(TM) 64-Bit Server VM         


        
3条回答
  •  既然无缘
    2020-12-02 16:06

    The Language level setting sets which features the code assistance in the editor should support. For example, if you're using JDK 1.7 but want your code to be compatible with JDK 1.6, you can set the language level lower than your actual JDK supports (6.0 in the case of JDK 1.6) and only get refactorings/syntax suggested that are supported on 1.6 and lower. Depending on your compiler, it may also give the compiler options to remove support for newer syntax elements.

    The 8.0 (which, as you're guessing corresponds to Java 8) is available for people that want to experiment with one of the Java 8 snapshots that are available. Since Java 8 isn't released, language level 8.0 may very well change before release.

提交回复
热议问题