© Vaskaran Sarcar 2020
V. SarcarInteractive Object-Oriented Programming in Javahttps://doi.org/10.1007/978-1-4842-5404-2_2

2. The Building Blocks: Class and Objects

Vaskaran Sarcar1 
(1)
Bangalore, Karnataka, India
 

Object-oriented programming (OOP) techniques primarily depend on two concepts—class and objects. In this chapter, we’ll discuss these topics in detail.

Class

A class is a blueprint, template, or prototype. It can describe the behaviors of its objects and is the foundation for how the objects are built or instantiated.

Object

An object is an instance of a class.

If you are familiar with the game of football (or soccer, as it’s known in the United States), you know the players who are participating in a game are selected for their skills in various ...

Get Interactive Object-Oriented Programming in Java: Learn and Test Your Programming Skills now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.