在Java中,我注意到,当我写INT I = 99但是工作INT I = 099不工作
int i = 99;
它工作正常。然而,当我说
int i = 099;
我得到一个异常:
java.lang.RuntimeException: Uncompilable source code - Erroneous tree type: <any>
在我的IDE,我看到一个红点说integer number too large: 099
。
为什么这不是编译?是不是099相当于99?
'099'被假定为Java中的八进制数。 [详情](http://docs.oracle.com/javase/specs/jls/se7/html/jls-3.html#jls-3.10.1)。 – Lion 2012-07-13 19:37:26