Site hosted by Angelfire.com: Build your free website today!
 

Experiment Continue

  • Comment out the first constructor for Child:

    class Child extends Parent {
    /* Child() {
            System.out.println("Creating the Child");
       }
    */
       Child(boolean flag) {
            System.out.println("Creating the Child with parameter");
       }
    }
  • Comment out the first constructor for GrandChild as well:

    class GrandChild extends Child {
    /* GrandChild() {
            System.out.println("Creating the GrandChild");
       }
    */
       GrandChild(boolean flag) {
            System.out.println("Creating the GrandChild with parameter");
       }
       . . .
    }