Tagged articles

Subclass

2 articles · Page 1 of 1
Lisa Notes
Lisa Notes
Jun 20, 2026 · Fundamentals

Java Variable Hiding: How Subclass Fields Mask Base Class Members

The note explains Java's variable hiding where a subclass field with the same name as a superclass field conceals the original, demonstrates it with a Father‑Son example, shows the output, and warns that such practice can hurt code readability.

JavaOOPSubclass
0 likes · 3 min read
Java Variable Hiding: How Subclass Fields Mask Base Class Members
Lisa Notes
Lisa Notes
Apr 24, 2026 · Fundamentals

Java Inheritance from Scratch: Stage‑2 AI Learning Notes

This note explains Java inheritance, covering the single‑inheritance class hierarchy, a Car class example, a ChildCar subclass that adds a load field, and eight key inheritance capabilities such as member reuse, method overriding, and constructor chaining, illustrating why inheritance improves code reuse and quality.

Class HierarchyJavaObject-Oriented Programming
0 likes · 7 min read
Java Inheritance from Scratch: Stage‑2 AI Learning Notes