O'Reilly logo

Java 9 Cookbook by Nick Samoylov, Mohamed Sanaulla

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

Getting ready

The term object usually refers to the coupling of data and procedures that can be applied to these data. Neither data, nor procedures are required, but one of them is--and, typically, both are--always present. The data are called object properties, while procedures are called methods. Properties capture the state of the object. Methods describe objects' behavior. Every object has a type, which is defined by its class (see the following). An object also is said to be an instance of a class.

The term class is a collection of the definitions of properties and methods that will be present in each of its instances--the objects created based on this class. Encapsulation is the hiding of object properties and methods that should not ...

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