Thinking in Terms of Objects

There are many different ways to conceptualize a computer program. One way is to think of a program as a series of instructions carried out in sequence, and this is commonly called procedural programming. Most programmers start by learning a procedural language such as BASIC in its many versions or Pascal.

Procedural languages mimic the way a computer carries out instructions, so the programs you write are tailored to the computer's manner of doing things. One of the first things a procedural programmer must learn is how to break down a problem into a series of simple steps.

Object-oriented programming looks at a computer program from a different angle: focusing on the task you are using the computer for, rather than ...

Get Sams Teach Yourself Java 2 in 21 Days, Second Edition 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.