What will be the output of the given program class A { int m-20, n=30; void display() 14 wwed fout of question System.out. println(m); class B extends A{ int n=40; void display ()...


What will be the output of the given program<br>class A {<br>int m-20, n=30;<br>void display()<br>14<br>wwed<br>fout of<br>question<br>System.out. println(m);<br>class B extends A{<br>int n=40;<br>void display ()<br>System.out.println(n);<br>class Main<br>{<br>public static void main(String[] args) {<br>B o=new B();<br>int k=o.n;<br>System.out.println(k);<br>}<br>

Extracted text: What will be the output of the given program class A { int m-20, n=30; void display() 14 wwed fout of question System.out. println(m); class B extends A{ int n=40; void display () System.out.println(n); class Main { public static void main(String[] args) { B o=new B(); int k=o.n; System.out.println(k); }

Jun 04, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here