Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Visibility of classes in subpackages

922750Mar 9 2012 — edited Mar 9 2012
A class is defined in a package. What are the ways to access that class in a subpackage without setting its access-specifier as public?

ex: package A has class 'Aclass'. package B is a subpackage of package A and wants to use the class 'Aclass'. what can be the access-specification of 'Aclass' other than public?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 6 2012
Added on Mar 9 2012
2 comments
1,399 views