Abstract Factory Design Pattern in Java

Introduction Abstract Factory pattern is one of the most used design pattern in Java. This type of design pattern comes under creational pattern as this pattern provides one of the best ways to create an object. Abstract Factory patterns works around a parent-factory which creates other factories. This factory is also called as Factory of factories. In Abstract Factory pattern…

Factory Design Pattern in Java

Introduction Factory pattern is one of the most used design pattern in Java. This type of design pattern comes under creational pattern as this pattern provides one of the best ways to create an object. In Factory pattern, we create object without exposing the creation logic to the client and refer to newly created object using a common interface. Factory…

Abstract Class design pattern and its use in Java

This tutorial will show you what is Abstract Class Pattern and when we consider to use this Abstract Class Design Pattern in our application design. The abstract class design pattern is useful for designing a framework for the consistent implementation of the functionality common to a set of related classes. An abstract class consists of one or more abstract methods…

Interface design pattern and its use in Java

In this tutorial we will show you what is Interface Pattern and when we consider this Interface Pattern to use in our application design. The interface pattern can be used to design a set of service provider classes that offer the same service so that a client object can use different classes of service provider objects in a seamless manner…

How Singleton Design Pattern Works in Java

Introduction Here in this post I will discuss how singleton pattern works in Java. Singleton pattern is a design solution, where an application wants to have one and only one instance of a class, in all possible scenarios without any exceptional condition. The singleton instance is actually created per JVM but not across multiple JMVs. The singleton class has a…