Chapter 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 no activity is more central to programming than writing methods. Ironically, despite the central role of methods, it is easy to get confused about what methods are and how they function. You need to be aware of a few syntactic subtleties in Java methods. But more confusing is the tendency of many developers and authors to slosh together the meaning of the words method, operation, and algorithm. By distinguishing the meanings of these terms, you can express important concepts that surface in many design patterns. ...

Get Design Patterns Java™ Workbook 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.