-
What is the output of this program?
class N
{
int K;
}
class M extends N
{
int L;
void display()
{
super.K = L + 5;
System.out.println(K + " " + L);
}
}
public class inheritance_Example
{
public static void main(String args[])
{
M object = new M();
object.K=4;
object.L=3;
object.display();
}
}
-
- 8 3
- 4 3
- 3 8
- 3 4
- None of these
Correct Option: A
Output: 8 3