CHAPTER 2

image

Designing Libraries, Classes, and Methods

Understanding the mechanics of creating Java code is relatively easy, but creating a good object-oriented design is much more complex. In this context, good means that the code works correctly and is reasonably easy to understand, maintain, extend, and reuse. This chapter describes some guidelines that can help you create code with those characteristics.

Reusability is an important goal and is one of the primary advantages of using object-oriented programming languages. Creating reusable code saves time and effort by avoiding the duplication that occurs when software must be created that’s similar ...

Get Pro Java 8 Programming, Third 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.