-
-
Notifications
You must be signed in to change notification settings - Fork 36
Open
Description
https://javabook.mccue.dev/class_extension/inheritance
even so late in the book, inheritance is still a challenge. id probably add a sentence or two, elaborating on what happens.
saying that a Ocean is considered to be a BodyOfWater, consequently it contains depth and swim. And hence, constructing a new Ocean(...) means it first needs to construct its BodyOfWater part and thats what the super(depth) in the constructor does.
I.e. it calls the BodyOfWater constructor
i understand u prob dont want to get too technical and thats fine. but it should probably elaborate just a bit on the topic to make clearer what this all means
originally suggested in the TJ discord by zabuzard.
Metadata
Metadata
Assignees
Labels
No labels