-
It’s a Creational design pattern that focuses on object creation process wherein creating product objects is the responsibility of the respective creators. There are 2 parallel class hierarchies defined in this pattern i.e., products and creators/factories. Purpose: Program to...
-
It’s a Creational design pattern that provides a way to construct complex objects by separating object construction from its representation, so that same construction process creates different representations. For example, you can have a car with different types of...
-
Auto-boxing and Unboxing is a feature of Java which allows us to assign primitives to wrappers and vice versa. But, at times while boxing there could be a chance of NPE if null checks are not done. Auto-boxing: Double...
-
It’s a Creational Design Pattern which talks about maintaining a single instance of a class throughout the application lifetime i.e., from start till the end of runtime process. Purpose: When we want to have a globally accessible object that...