4.9. Using Methods: Toward Object-Oriented Programming

While the next chapter is really devoted to understanding OOP and planning OOP applications, this chapter would not be complete without a discussion of methods. This will give us a flavor for objects.

So far we have only discussed procedural programs; that is, programs that work from top to bottom, like a browser reads HTML. Once we're inside the main() method, the program executes top to bottom with no break or redirection. It has been very straightforward.

This approach has been very useful, but one can quickly see that it is not very extensible. Creating programs that had all of their code behavior written inline would be a nightmare to update later, and it would be extraordinarily difficult ...

Get Java™ for ColdFusion® Developers 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.