If class B extends A, then public and protected variables of A are inherited by B, and private variables are not. But public and protected variables are directly accessible by other classes of the same package.
How can I make these inherited variables private?