Classes, methods, variables and constants that any user of the class is permitted to see and use, whether they belong to the same package or not, whether or not they are subclasses of this class. All interfaces are implicitly public. If you have a variable or method you want users of your class to be able to access, you must declare it public. Often public getters/setters wrap private variables. This way you can later insert extra validation code if needed. Other classes cannot bypass your checks since they can’t get at the private variable directly.
This page is posted
Optional Replicator mirror
Please read the feedback from other visitors, or send your own feedback about the site.
Contact Roedy. Please feel free to link to this page without explicit permission.
Your face IP:[126.96.36.199]
You are visitor number|