Cover Data Structures and Algorithms with Object-Oriented Design Patterns in Java
next up previous contents index

Reduce, Reuse, Recycle

Modern societies produce an excessive amount of waste. The costs of doing so include the direct costs of waste disposal as well as the damage to the environment caused by the manufacturing, distribution, and ultimate disposal of products. The slogan ``reduce, reuse, recycle,'' prescribes three strategies for reducing the environmental costs associated with waste materials.

These strategies apply equally well to Java programs! A Java program that creates excessive garbage may require more frequent garbage collection than a program that creates less garbage. Since garbage collection can take a significant amount of time to do, it makes sense to use strategies that decrease the cost of garbage collection.




next up previous contents index

Bruno Copyright © 1998 by Bruno R. Preiss, P.Eng. All rights reserved.