O'Reilly logo

Oracle Certified Associate, Java SE 7 Programmer Study Guide by Richard M. Reese

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 6. Classes, Constructors, and Methods

In the heart of object-oriented programming are classes and the objects created from classes. The initialization of the objects occurs in constructors while the modification of the state of an object is carried through methods. The packaging of these constructors and methods is the focus of data encapsulation. The fundamentals of classes, constructors, methods, and data encapsulation are addressed in this chapter.

We start with an introduction to classes including a discussion of how objects are managed in memory. Common aspects of constructors and methods are then presented including the concept of a signature, the passing of arguments, and the uses of the this keyword.

The usage of constructors is ...

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