Intro to Java Objects and Classes

This entry is part 1 of 13 in the series Intro to Java

This lesson will cover some basic concepts in Java related to classes and objects. It was created as a lesson for a class room setting. I have converted it to a post here.

Class vs Object

Definition from page 10, Java A Beginner’s Guide (Herbert Schildt)

A class defines the form of an object. It specifies both the data and the code that will operate on that data. Java uses a class specification to construct objects. Objects are instances of a class. Thus, a class is essentially a set of plans that specify how to build an object.

The code and data that constitute a class are called members of the class. Specifically, the data defined by the class are referred to as member variables or instance variables. The code that operates on that data is referred to as member methods or just methods.

Sun Trails


OO Trail:
Continue reading