Home Access levels of classes in java
Reply: 0

Access levels of classes in java

user610
1#
user610 Published in May 20, 2018, 9:59 am

This question already has an answer here:

  • In Java, difference between package private, public, protected, and private 26 answers

A class from a subpackage needs to access a class from a package one level up. So, I need to keep the target class as public. But I don't want that class to be accessed by any other class. What can I do?

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.309395 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO