How do I call a private method in this type of parent class? What I have done is an ugly peice of code but it works though I don't think it's a real solution.
Would really appreciate some advice on how this is done. I have looked to find solution but non that have given me some clarity on the matter.
public abstract class Car {
public void passItOn(int a) {
takesVariable(a);
}
private void takesVariable(int a) {
//Process the variables
}
the child:
public abstract class Wheel extends Car {
boolean a = anotherMethod();
if(value() != a) {
passItOn(a);
}
}
There is some issue with my accaptance rate but I am on it! All will give + marks for replies!!!