Why Use Classes?

When dealing with classes, it's important to remember that classes do not enable programmers to do anything more than they would be able to do without them. Although it might be significantly more work, you could write all OOP programs structurally.

Classes are used for the same reason large companies are divided into departments and those departments are divided into subdepartments. When a company is faced with organizing hundreds of people around hundreds of tasks, a divide and conquer strategy is the only way to survive. A departmental architecture divides tasks into manageable, and hopefully related, pieces that can be addressed by an appropriate group of staff. If you're in the engineering department, you care about getting ...

Get Special Edition Using Java 2 Standard 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.