Design Pattern Implementation in JAVA
The repository contains examples of commonly used creational design patterns like Singleton, Factory ,Builder and AbstractFactory pattern
Singleton Pattern : The idea of Singleton Pattern is to implement only a single instance of the class per JVM, and provide a global point of access to it.
Features of Singleton Pattern :
- Private Constructor - This doesn't allow other classes to instantiate the class using new keyword.
- Public Accessor Method - This method return the instance of the Singleton class.