0

Output?And how?

public class Program { public static void main(String[] args) { int a=012; System.out.println(a); } }

3rd Dec 2019, 9:40 AM
Cheliyan
Cheliyan - avatar
1 Antwort
+ 3
0 prefix means it is an octal number. And its equalent int value is 10. That's why you get Answer as 10.. .
3rd Dec 2019, 11:26 AM
Jayakrishna 🇮🇳