Sponsored Link •
|
Advertisement
|
Advertisement
|
This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.
Message:
Default access acts like public access when all the files concerned are in the same package. If you write a library, you will probably want to put it in its own package. If you did this and then tried to use the library from another package or the default package, you would find that all the default-access methods and data that you used to be able to access would no longer be accessible. A very thorough discussion of this topic can be found in Bruce Eckel's "Thinking in Java", Chapter 5. Hope this helps! --Erik > In many books it is writen that if we donot put public in front of a variable then it is default access . But at the same time it is also written that public access and default access are the same thing . But i donot agree with this . So I want to ask that
Replies: |
Sponsored Links
|