Lowest price ever! Learn Generative AI for 48% less!
Get my discount+ 3
In regards to Java:
Say you have class A that is the superclass of class B
The superclass can only refer to variables that have been declared within class A or within its own superclass (and their superclasses). It has no knowledge of any variables defined in class B and other descendant classes.