我目前使用的是 Java 中的数据类型,如果我理解正确的话,long
类型接受 -9,223,372,036,854,775,808到 + 9,223,372,036,854,775,807之间的值。现在你可以看到,我已经创建了一个名为 testLong
的 long
变量,虽然当我插入9223372036854775807作为值时,我得到一个错误说明:
Int 类型的文字9223372036854775807超出了范围。
我不知道为什么它把 long
数据类型称为 int
。
有人知道吗?
密码:
char testChar = 01;
byte testByte = -128;
int testInt = -2147483648;
short testShort = -32768;
long testLong = 9223372036854775807;
float testFoat;
double testDouble = 4.940656458412;
boolean testBool = true;