Design Pattern
Design Pattern
Design Pattern
design pattern will give the instance of child class as per the type of instance class you want will
pass in parameter.
There is parent class and child class and factory class and factory class will give the object of
type you pass in parameter.
Eager Initialization
eager initialization means that the singleton instance is created as soon as the class is
loaded into memory.
eager initialization means as soon as the class is loaded in memory object will
* create and initilized in static singleton class variable
Lazy Initialization
Whenever there is need and we will call the method then only object will create and initilze
First it will check weather there is object present or not if not then it will create a object and
initialize and next time when we will call it will give same object