O'Reilly logo

Technical Java™: Developing Scientific and Engineering Applications by Grant Palmer

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. Classes

If you are unfamiliar with object-oriented programming, you might find talk about classes and objects rather mysterious. In reality classes are not all that complicated to understand. A class is a named block of code that defines a reference type. The class is the basic building block of all Java programs. The class provides the structure or blueprint for objects. An object is an instance of a class.

Classes will, in general, consist of members (fields, methods, and nested classes and interfaces), initializers (both instance and static), and constructors. The fields define the data structure of the class. The methods will generally be used to access and manipulate the fields. Initializers and constructors are normally used 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