I'm sure this will turn out to be a stupid question, but can someone tell me, in Java (although I'm sure this must have some relevance to other languages), what a superclass constructor is actually doing?
Say I have a parent class with a constructor that sets a variable (that isn't necessarily a static one) from the parameter given to the constructor, and then I call the superclass constructor in the constructor of a child class. If I haven't ever instantiated the parent class (although it's the same if I have), what is that superclass constructor actually referring to (the class itself or a non-existent object of it?), and where would that variable that it set actually have been set? Surely it has to be something else if a superclass constructor is able to alter variables that aren't static? If it alters a non-static variable but that class is never instantiated, what happens to the value of that variable? How does one access it and so on?
Sorry if this is hard to understand, but hopefully someone can explain this? And again, I'm sure this will turn out to be a stupid question.
Thanks