How to Easily use Factory Design Pattern in Java

How to Easily use Factory Design Pattern in Java

Hey, Tea Lovers! Let me continue our design pattern series by adding this post. The Factory Design Pattern or Factory Method Design Pattern. It is one of the widely used and easy-to-understand Design patterns. It鈥檚 an effortless yet effective way of hiding object creation complexity. That鈥檚 why it is under the creation pattern category. So let鈥檚 jump right into it. Prerequisite to knowing Factory Design Pattern Before understanding what a factory design pattern is, you need to understand what superclass and subclass are. I am pretty sure you are aware of this detail, if not, the following section describes it in brief. if you already know it, you can skip to this part ...

August 5, 2022 路 6 min 路 Imran Shaikh
Singleton Pattern In Java One for All Hero (1) (1)

Singleton Pattern In Java: One for All Hero

Hey, Tea lovers! Today I will talk about the One for All power. Singleton Design Pattern in Java. This post will be the start of the series on Design Patterns in Java. The Singleton pattern is the most basic and easy-to-understand design pattern there is. So it makes a good starting point in the journey of design patterns. Let us jump right into it. What is Singleton Pattern and Object By definition, the singleton pattern is a design pattern that restricts the class to initiate only once. This means it can only make only one object of the class. And this pattern is a base pattern of other design patterns as well. Such as Factory Pattern, Builder Pattern, or Prototype Pattern. Don鈥檛 worry we will convert them in the upcoming post. So please subscribe to our website. ...

July 11, 2021 路 5 min 路 Imran Shaikh