20 Introducing Operations

WHEN YOU WRITE a Java method, you produce a fundamental unit of work that is a level up from writing a statement. Your methods have to participate in an overall design, architecture, and test plan, but writing methods is central to object-oriented programming. Ironically, despite the central role of methods, it is easy to get confused about what methods are and how methods function. This confusion may stem from the tendency of many developers—and authors—to mix the meaning of the words method and operation. Further, the concepts of algorithm and polymorphism are more abstract than methods and yet are ultimately realized by methods.

Having a clear understanding of the terms algorithm, polymorphism, method, and ...

Get Design Patterns in Java™, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.