i have declared Long checkRandom=0101010101l;
but when I am printing checkRandom it printed checkRandom==17043521
what was the reason its taking checkRandom=17043521
not checkRandom=0101010101
Asked
Active
Viewed 65 times
-1

vaibhav patil
- 143
- 11
-
6Numbers that start with a zero are treated as octal. – r3mainer Jul 07 '16 at 10:43
-
Or [this one](http://stackoverflow.com/questions/5540179/long-value-with-0-on-left). – Andy Turner Jul 07 '16 at 10:45
-
1Seems more a duplicate of [this](http://stackoverflow.com/questions/16611185/unexpected-int-integer-behavior-when-number-starts-by-0) to me. – BackSlash Jul 07 '16 at 10:45
-
1@BackSlash there is a myriad of potential duplicate questions. – Andy Turner Jul 07 '16 at 10:47
-
@squeamishossifrage yes you are right.thank you all – vaibhav patil Jul 07 '16 at 11:00