What is difference between this two sentence :
AA- a subclass within the same package as the instance's superclass can override any superclass method that is not declared private or final.
BB- a subclass in a different package can only override the non-final methods declared public or protected.
I believe each method can be overriden from it's superclass if it is not final
in java private methods are "automatically final, and hidden from the derived class"
in java any non-static methods can be public , protected or private
So from sentence AA I conclude that only public and protected superclass's methods can be overriden
and the same from sentenceBB
So I confused what is the distinction between 2 sentences?