1.

What is the output of this program?

class N
{
public int K;
public int L;
N()
{
K = 5;
L = 2;
}
}
class M extends N
{
int p;
M()
{
super();
}
}
public class inheritance_super_use
{
public static void main(String args[])
{
M obj = new M();
System.out.println(obj.K + " " + obj.L);
}
}

A. 5 1
B. 1 5
C. 5 2
D. 2 5
E. None of these
Answer» D. 2 5


Discussion

No Comment Found

Related MCQs