+91-85006-22255
What will be the output of the following program?
class OutPut{ public static void main(String s[]) { int i = 2; B b = new B(); b.execute(); }}class A{ A() { int i = 1; }}class B extends A{ void execute() { System.out.println("i = " + i); }}
Topic: Inheritance And Constructors In Java
Read this topic Take test on this topic
Open In App