O'Reilly logo

Beginning JavaFX™ by Praveen Mohan, Lawrence PremKumar

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 7. Access Specifiers

An important aspect of object-oriented programming is data encapsulation (also called data hiding), whereby the implementation details of a class are kept hidden from the users of the class. Not only the implementation but also the data can be kept hidden from the user. Or one can choose to provide varying degrees of restricted access to those data members through functions.

In general, this concept can be simply stated as "differentiating things that change from things that do not." This is particularly important when you are writing an API library that the application developer is going to use. Any user of your API library should be able to rely on your API when writing the application and should not be forced to ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required