Inheritance - accessing private variables
Hi, im really a beginner at java but just trying to understand some basic inheritance theory.
I understand how to make a subclass and make a constructor in the subclass but what i'm confused with is accessing the superclass' private variables.
For example say a subclass has a method which calculates its private variable with a private variable from its superclass. I'm pretty sure:
(superclasses variable)*(subclass variable)
will produce an error with how the superclass variable is private.
I read that getter methods are used to access private variables values from a superclass. I'm just wondering in the subclass' method, how is this done to use these getter methods to get the value I(from superclass private variable) and make the calculation?
Any explainations or examples are much appreciated. I've looked on the net for examples but there either not related to what i'm after or just way to in depth with information which isn't where my java knowledge is yet ^.^