+ 1
(Java) what happens when we declare an int and assign it a value which start with 0?
For example: int a = 065; System.out.println(a) Why output is 53?
2 odpowiedzi
+ 7
When you write zero in front of a number, then the number is treated as octal number.
065octal = 6*8^1 + 5*8^0 = 53decimal
+ 2
voja thanks now I understand