If there is any private member in the superclass, then the setter and getter methods are used, because we cannot use the private member in its subclass.
And in the case of any static instance member, you can directly use it with the class name. If it is a member of an instance of a superclass, try accessing / modifying this element in a subclass using the super keyword. Can you change with the this keyword also if you have an instance member in a superclass and subclass with the same name? Then, in this case, using this JVM keyword, you will access the current member of the instance of the ie class of the subclass.
source share