Java – subclass inheritance using different packages?

Thanks for the great answer about inheritance Another question:

Subclasses can always inherit protected members of their superclasses Is this true even if they are not in the same package?

Solution

Yes, they can always inherit protected members of their superclasses, regardless of their package

From @ L_ 301_ 0@,

Starting with java tutorial,

I think this may be your required solution

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>