Accessing child properties when calling a function from its parent
So I've a
Shape
Shape
parent class and a
Circle
Circle
child class.
The child class calls the parent's constructor with
super
super
, which then calls
generateMarkup
generateMarkup
- a function all children have.
Problem is this function uses an instance variable in the child class, and this appear not to have been set yet.
Not sure if I've made a mistake, but I had thought (admittedly from hazy Java memories) that instance variables were set prior to constructors running?