Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Protected class member

4 views
Skip to first unread message

JiiPee

unread,
Apr 27, 2016, 11:25:51 AM4/27/16
to
In C++ protected members can only be called from inherited classes. In
java they can also be called from package-classes, even if not inherited.

My questions is, that if I want only the inherited classes to see the
protected members what is the right way to do it? Is it that I have to
put them into a separate package? I have to create a new package and do
it there? Is this the normal way to do this?
Message has been deleted
Message has been deleted
Message has been deleted

Graeme Geldenhuys

unread,
Aug 14, 2019, 1:51:02 PM8/14/19
to
On 31/07/2019 5:09 pm, cema...@gmail.com wrote:
> In C++ protected members can only be called from inherited classes. In
> java they can also be called from package-classes, even if not inherited.

Then move that class into a separate package. Simple as that. ;-)

Regards,
Graeme

0 new messages