Java Parent instantiated through Child class Parent attribute private set in child constructor
<p>I would like to create an abstract parent class ,which contains the method public abstract use(); and the use method is different in different child classes, but utilize the parent method for all the rest however I would like the parent class to contain a private variable but it needs to be set from the specific child depending on the child so like I have a Parent Car and I want to work with cars in general but, for the specific purpose of the use() method and setting the car image I use the Porsche class which is a child. I dont want the Car image attribute to be accesible but at the same time if its private I cant set it from the child constructor, any ideas? My question is how to set a parent private variable from the child constructor when I instantiate like Parent parent = new Child ();</p>