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
|no blog for this page||Canadian
Your face IP:[188.8.131.52]
You are visitor number|