Java Basics  «Prev  Next»

Lesson 12

Review Object Oriented Analysis Concepts in Java

This module discussed some of Java's advanced object-oriented features, including interfaces, packages, and access control. In particular, you learned about the keywords:
  1. package
  2. import
  3. interface
  4. implements
  5. public
  6. protected
  7. private
You also learned that even though Java manages the memory, you can request that it perform certain tasks, such as garbage collection.
While you cannot free memory directly, you can ask the Java runtime to do it for you.

Object Oriented Concepts

Before we delve deeper into the advantages of OO development, let us consider a more fundamental question:
What exactly is an object?

This is both a complex and a simple question and is complex because learning any method of software development is not trivial. It is simple because people already think in terms of objects.
For example, when you look at a person, you see the person as an object and an object is defined by two terms:
  1. attributes and
  2. behaviors.
A person has attributes, such as eye color, age, and height. A person also has behaviors, such as walking, talking, breathing, and reading text. In its basic definition, an object is an entity that contains both data and behavior. The word both is the key difference between OO programming and other programming methodologies. In procedural programming, for example, code is placed into totally distinct functions or procedures. In a procedural language procedures become "black boxes", where inputs go in and outputs come out. Data is placed into separate structures and is manipulated by these functions or procedures.