+ 1
What does this mean?
The above code gives output 8,when initialized with 010. anyone pls explain this? public class Program { public static void main(String[] args) { int a=010; System.out.println(a); } }
3 odpowiedzi
+ 2
02 will save 2 to the variable and 8 should go for next input so in my opinion the output should be just 2 .
I had tried this with arrays and it stores values in different array members .
+ 1
starting with 0 change number to octal .
+ 1
thanks @Sahaj
and also when I replaced int a=028;
it showed integer number too large.....
anyone pls explain?