+ 1

Why this code output show incorrect value

When I put value inside array it prints wrong output https://code.sololearn.com/cn1I4vR01d9p/?ref=app

13th Feb 2021, 7:58 AM
Shahi Shreshth
Shahi Shreshth - avatar
1 Antwort
+ 2
Numbers that start with 0 in Java are seen as octal numbers so 011 is actually 9 and 013 is actually 11
13th Feb 2021, 8:13 AM
Angelo
Angelo - avatar