1.

What is the output of this program?

final class n
{
int K;
}
class n1 extends n
{
int L;
System.out.println(L + " " + K);
}
public class inheritance_Example
{
public static void main(String args[])
{
n1 obj = new n1();
obj.display();
}
}

A. Runtime Error
B. 4 4
C. Compilation Error
D. 5 5
E. None of these
Answer» D. 5 5


Discussion

No Comment Found

Related MCQs