Q. What is the output for the below code ?
Code:1. public class Test{
2. public static void main(String[] args){
3. int i = 010;
4. int j = 07;
5. System.out.println(i);
6. System.out.println(j);
7. }
8. }
β
Correct Answer: (A)
8 7
Explanation: By placing a zero in front of the number is an integer in octal form. 010 is in octal form so its value is 8