Sunday, January 31, 2016

ChildClass4

package inheritance;

public class ChildClass4 extends ParentClass4{

    int k = 90;

static int m = 70;

public void test4(){
System.out.println(" I am from child class test4");
}


public static void main(String[] args) {
// TODO Auto-generated method stub

ChildClass4 obj1 = new ChildClass4();

ParentClass4 obj = new ChildClass4();

obj.test1();
obj.test2();


obj1.test1();
obj1.test2();
obj1.test4();


}

}

1 comment:

  1. Good Post! Thank you so much for sharing this pretty post, it was so good to read and useful to improve my knowledge as updated one, keep blogging.

    Core Java Training in Electronic city

    ReplyDelete