When you are overriding the method from parent class, its not called "accessing" - you are basically modifying the functionality of the base class - completely changing it or enhancing it. Accessing a private function of the super class would still give compile time error. narrowing down the privilege of the overridden method in child class will also give you compile ...
Obviously, Jim and Jesper's comments do not apply to the last example Steve gave - because private members are visible to other classes contained within the same top-level class. But they do apply to the most common case, in which no nested classes are involved, and all classes under discussion are separate top-level classes. In this case, private members are completely ...
Hi all, I have a class with two methods, one private and one public, and the public method calls the private method. If i create a second class that extends the first, and create a private method with the same signature as the first class (overriding it), then if a user calls the public method of the second class then would ...