此语言级别不支持文字中的下划线 [英] Underscores in literals are not supported at this language level
本文介绍了此语言级别不支持文字中的下划线的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在使用下划线创建最终双精度时出现此错误,以使双精度更具可读性。它是在 run()
方法中声明的。
I got this error when creating a final double using underscores to make the double more readable. It was declared in a run()
method.
public void run() {
final double nanoSeconds = 1_000_000_000.0 / 60.0;
}
我正在使用IntelliJ IDEA 12.
I'm using IntelliJ IDEA 12.
推荐答案
在 IntelliJ IDEA
中,您必须更改项目语言级别
在项目设置中 7.0
级别:
In IntelliJ IDEA
you have to change Project language level
in project settings to 7.0
level:
这篇关于此语言级别不支持文字中的下划线的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文