| | ExperimentUse the second constructor of GrandChild
in main: public static void main(String[] args) {
GrandChild obj = new GrandChild(true);
}Add an explicit call to the Child(boolean flag)
constructor as follows: GrandChild(boolean flag) {
super(flag);
System.out.println("Creating the GrandChild with parameter");
}
|