long num = 22952601027516L;
long num = 22952601027516;
因为默认是int型装不下 会报错
The literal 22952601027516 of type int is out of range
本文探讨了在编程中处理超出int类型范围的长整数22952601027516时遇到的问题及解决方法。通过添加字母'L'将其声明为long类型,成功解决了字面量溢出的问题。
long num = 22952601027516L;
long num = 22952601027516;
因为默认是int型装不下 会报错
The literal 22952601027516 of type int is out of range
3469
662
727

被折叠的 条评论
为什么被折叠?