O'Reilly logo
  • Garrett Maring thinks this is interesting:

The code super(a,w) on Line 6 invokes the parent class' (Person's) constructor to initialize the age and weight data members, and Line 10 invokes the parent class' toString method to fetch the annotated values of the person's age and weight


Cover of Data Structures and Algorithms Using Java


super() automatically is constructor of parent ckass