Building Child Classes with this and super¶
โ Java 17
A child class uses its parent's members, but not all of them, and sometimes two members share one name. Here you'll see how to reach private data properly, which modifiers a class itself can have, and how this and super point at exactly the field you mean.
In this series¶
| # | Page | Reading time |
|---|---|---|
| 1 | Child classes and class visibility | 3 min |
| 2 | this and super | 4 min |
| 3 | Lab: premium plans with this and super | 3 min |
๐ OCP 1Z0-829 candidates: exam traps and practice questions (optional)
Prerequisites: Building Classes on Top of Other Classes.