Can a private method of a superclass be declared within a subclass?

Q

Can a private method of a superclass be declared within a subclass?

✍: Guest

A

Sure. A private field or method or inner class belongs to its declared class and hides from its subclasses. There is no way for private stuff to have a runtime overloading or overriding (polymorphism) features.

2012-08-31, 2011👍, 0💬