This is the scenario:
Package 1 has Public class Machine
which has a protected variable protected int speed=3;
I have another package ,
Package 2 ,which has Public class Car
which is a child of Machine class and we also have a Public class Apple
which has the main method.
My question is : why speed is accesible from within Car class method/constructor but not from the instance of Car class created from main method present in Appple class.
I am new in java please help ...