MCQ Single Best Answer Not Set

QWhat is the output for the below 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. }

ID: #2022 Java Data Types and Variables - MCQ 2,070 views
Question Info
#2022Q ID
Not SetDifficulty
Java Data Types and Variables - MCQTopic

Choose the Best Option

Click any option to instantly check if you're correct.

  • A 8 7
  • B 10 7
  • C Compilation fails with an error at line 3
  • D Compilation fails with an error at line 5
Correct Answer: Option A

Explanation

8 7

Share This Question

Challenge a friend or share with your study group.