1.

What is the output of this program?

class N
{
public int K;
protected int L;
}
class M extends N
{
int L;
void display()
{
super.L = 5;
System.out.println(K + " " + L);
}
}
public class Result
{
public static void main(String args[])
{
M object = new M();
object.K=3;
object.L=4;
object.display();
}
}

A. 1 2
B. 2 3
C. 3 4
D. 4 5
E. 5 6
Answer» D. 4 5


Discussion

No Comment Found

Related MCQs