Learn Design Patterns in JavaExample of Observer Design Pattern in java
December 03, 2013To understand Observer Design Pattern, we will take one real time example. We read newspaper. We get the daily news by news paper. Here we are the observer and the news paper is observable. Observer Design Pattern keeps the data of its entire listener and whenever there is any change it notifies to its listener. Speaking clock is another example of Observer Design Pattern. Example of Singleton Design Pattern in Java
December 01, 2013Singleton Design Pattern is widely used in the software application. This design pattern ensures that a given task will be performed by only one class and that class will be global access of point. So getting one and only one instance of class ensures so many purposes of the developers in different scenario. We will discuss the uses after creating our singleton class.