Showing posts with label Default. Show all posts
Showing posts with label Default. Show all posts

Access Mechanism in Packages Demystified

  • 0
     Packages in java are both, a naming and a visibility control mechanism,. In this article, I will try to show the behaviour of access modifiers in different situations. We have 4 type of access in Java, they are public, private, protected and default. Out of these, only public and default can be used with classes. When no access modifier is explicitly written before a member, is is supposed to be in default access.