A

Admin • 828.03K Points
Coach

Q. What is the output for the below code ?

Code:
public class Test
{
public static void main(String[] args)
{
int i = 010;
int j = 07;
System.out.println(i);
System.out.println(j);
}
}
  • (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)
  • Views: 17
  • Filed under category Java
  • Hashtags:

No solution found for this question.
Add Solution and get +2 points.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.