更新时间:2022-06-23 22:49:31
没有区别。看看 Java语言规范,第3.10.2节
There is no difference. Have a look at the Java Language Specification, section 3.10.2
DecimalFloatingPointLiteral:
数位。数位
opt ExponentPart
opt FloatTypeSuffix
opt
。数字ExponentPart
opt FloatTypeSuffix
opt
数字ExponentPart FloatTypeSuffix
opt
Digits ExponentPart
opt FloatTypeSuffix
Digits . Digits
optExponentPart
optFloatTypeSuffix
opt
. Digits ExponentPart
optFloatTypeSuffix
opt
Digits ExponentPart FloatTypeSuffix
opt
Digits ExponentPart
optFloatTypeSuffix
...
FloatTypeSuffix:
f F d D
都是一个 DecimalFloatingPointLiteral
,第一个类型1,第二个类型4
Both are a DecimalFloatingPointLiteral
, the first one type 1, the second one type 4