-1
我宣佈Long checkRandom=0101010101l;
但是當我打印checkRandom它印checkRandom==17043521
什麼是它採取checkRandom=17043521
不checkRandom=0101010101
爲什麼Long值在java中沒有正確打印?
我宣佈Long checkRandom=0101010101l;
但是當我打印checkRandom它印checkRandom==17043521
什麼是它採取checkRandom=17043521
不checkRandom=0101010101
爲什麼Long值在java中沒有正確打印?
只需刪除0領先的原因:
Long checkRandom=101010101l
數字以零開始被處理作爲八進制。 –
或[this one](http://stackoverflow.com/questions/5540179/long-value-with-0-on-left)。 –
似乎更多的[this](http://stackoverflow.com/questions/16611185/unexpected-int-integer-behavior-when-number-starts-by-0)給我。 – BackSlash