Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
Experience has shown that the best way to develop and maintain a large program is to construct it from small, simple pieces, or modules. This technique is called divide and conquer (p. 198).
Methods are declared within classes. Classes are typically grouped into packages so they can be imported and reused.
Methods allow you to modularize a program by separating its tasks into self-contained units. The statements in a method are written only once and hidden from other methods.
Using existing methods as building blocks to create new programs is a form of software reusability (p. 199) that allows you to avoid repeating code within a program.