public scope : Java Glossary


public scope

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
on the web at:

Optional Replicator mirror
on local hard disk J:

Canadian Mind Products
Please the feedback from other visitors, or your own feedback about the site.
Contact Roedy. Please feel free to link to this page without explicit permission.

Your face IP:[]
You are visitor number