Java Int Array - Number being stored are different from ones specified
Posted
by
Danadir
on Stack Overflow
See other posts from Stack Overflow
or by Danadir
Published on 2011-02-24T15:05:50Z
Indexed on
2011/02/24
15:24 UTC
Read the original article
Hit count: 136
Hey there, I have encountered the most weird problem ever in Java. When I am doing this:
int []s = new int [5];
s[0] = 026;
s[1] = 0011;
s[2] = 1001;
s[3] = 0026;
s[4] = 1101;
the numbers being stored in the array, seen from debug mode are different i.e. the numbers stored are 22,9,1001,22,1101. Can you give me some hints what might be wrong with this? Thanks in advance
© Stack Overflow or respective owner