Variables and methods of super class can be overridden in subclass. In case of overriding, a subclass object call its own variables and methods. Subclass cannot access the variables and methods of super class because the overridden variables or methods hides the methods and variables of super class.But still, java provides a way to access…