class A { int i,j; A(int i,int j) { this.i=i; this.j=j; } void show() { System.out.println("i="+i+" "+"j="+j); } } class B extends A { int k; B(int k) { this.k=k; } void showsub() { System.out.println("i+j+k= "+(i+j+k)); } } class inherit { public static void main(String args[]) { A obj1=new A(3,5); B obj2=new B(7); obj1.show(); obj2.showsub(); } }
super()
super(0,0);
B
A
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)