Created
August 25, 2019 11:20
-
-
Save purechamploo/56acb2f654cde585654993d8c82f325e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
自己写了一个app,在造数据进行测试时,发生了一件升起的事情 | |
如下图: | |
b是由a-i*86399999得到,二者均为long类型 | |
但发现在86399999这个数字后如果不加l,会发生以下事件 | |
b居然比a大! | |
我是这样发现的:一开始我并没有加L,后面猜测会不会是long和int加减的问题,遂在86399999后加了这个L | |
注释一下:86399999是一天24小时总共的时间戳,我为了生成每天的数据弄的这个值 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment