4.10. Visibility

Visibility is similar to “scope” in ColdFusion and other languages such as Visual Basic. Everything in a program is not visible to every other thing all of the time. That is a prescription for chaos in code maintainability, encapsulation, and readability. In order to ensure the integrity of your data and the operations you perform on them, you declare classes, methods, and data as having certain visibility. You do that using access modifiers.

4.10.1. Access Modifiers

Access modifiers are composed of Java keywords that describe how something is stored or how it runs. Access modifiers are used in declaring variables (data fields), methods, and classes. They determine what level of access the item will allow. That is, an access ...

Get Java™ for ColdFusion® Developers now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.