D. Formenton wrote:
If I extends a class A to Class B, in B I can see all public getters and setters (and public methods).
My question is: it possible to avoid to show some (not all) of public getters and setter (and public methods) of superclass when I use the subclass?
Of course, this is not recommended, as a subclass IS-A superclass, and must work in place of a superclass. However, if you really want to do this, one option could be to "disable" the public methods by overriding them -- to throw an exception. The overridden method is still accessable to the subclass, as it can use the super keyword.
Henry