What will be the output of the given program: class A { int m=20, n=303B void display() { System.out.println(m); } class B extends A{ int n=40; void display() { System.out.println(n); class Main {...

Solve it quickly please now
What will be the output of the given program:<br>class A {<br>int m=20, n=303B<br>void display()<br>{<br>System.out.println(m);<br>}<br>class B extends A{<br>int n=40;<br>void display()<br>{<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>

Extracted text: What will be the output of the given program: class A { int m=20, n=303B void display() { 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 10, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here