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.
Showing posts with label Protected. Show all posts
Showing posts with label Protected. Show all posts
Subscribe to:
Posts (Atom)