Font size:
Print
Question:
1. 10 20
2. Compilation error at line 8
3. Compilation error at line 7
4. Compilation error at line 9
Check Answer
Given two files, what will be the output?
class A
{
int x= 10;
public int y = 20;
}
public class Test
{
public static void main (string []args}
A a = new AO: //line 7
System.out.println (a.x);
System.out.println(a.y);
}
}
1. 10 20
2. Compilation error at line 8
3. Compilation error at line 7
4. Compilation error at line 9
Check Answer