
Transitioning to Java
By :

Software design patterns describe solutions to specific issues in software. This concept comes from architecture and engineering. Imagine that you need to design a bridge to cross a river. You will likely begin by choosing the bridge type or pattern. There are seven types of bridges:
These types, or patterns, describe how the bridge should span the river you wish to build your bridge over, but they do not provide detailed instructions or blueprints. They guide the architect in the design of the bridge. Software patterns work in a similar fashion. Let us look at four widely used patterns and how they could be implemented in Java.
A singleton is a Java object that can only be instantiated once. It is a creational pattern. Wherever this object is used in an application, it is always the same object...