Java Reference
In-Depth Information
CHAPTER 5
Object-Oriented Java
Programming languages have changed a great deal since the first days of application de-
velopment. Back in the day, procedural languages were state-of-the-art; as a matter of
fact, there are still thousands of COBOL applications in use today. As time went on,
coding became more efficient, and reuse, encapsulation, abstraction, and other object-
oriented characteristics became fundamental keys to application development. As lan-
guages evolved, they began to incorporate the idea of using objects within programs.
The Lisp language introduced some object-oriented techniques as early as the 1970s, but
true object-oriented programming did not take off in full blast until the 1990s.
Object-oriented programs consist of many different pieces of code that all work to-
gether in unison. Rather than write a program that contains a long list of statements and
commands, an object-oriented philosophy is to break functionality up into separate or-
ganized objects. Programming techniques such as using methods to encapsulate func-
tionality and reusing the functionality of another class began to catch on as people no-
ticed that object orientation equated to productivity.
In this chapter, we touch upon some of the key object-oriented features of the Java
language. From the basic recipes covering access modifiers, to the advanced recipes that
deal with inner classes, this chapter contains recipes that will help you understand Java's
object-oriented methodologies.
5-1. Controlling Access to Members of a
Class
Problem
Search WWH ::




Custom Search