Prototype Design Pattern

What is Prototype Design Pattern?

Introduction The prototype design pattern falls under the creational design pattern category. It uses the object re-use principle to gain the benefit of solving the problem. This pattern is most appropriate when object creations are costly and time-consuming. The already created clone helps to save the cost and the construction time of the required object. […]

Read More

Abstract Factory Pattern in Java

What is Abstract Factory Pattern? Abstract factory pattern is a creational design pattern. It adds another layer to the factory method pattern. This pattern includes a generic interface to create families of objects. This pattern is useful when a client object wants an object instance from a group of related or dependent classes without any […]

Read More

Reactive Streams In Java 9

Reactive programming is becoming ubiquitous when it comes to building any real-time system in recent times. Software designs are shifting from the conventional servers and containers to be event-driven, responsive, scalable and handle failures gracefully. The problem with the traditional approach of creating multithreaded, synchronized and shared applications was that the end products were tightly […]

Read More

Builder Pattern with Java examples

What is Builder Pattern? Builder pattern is a creational design pattern. The main intention of the builder pattern is to create complex objects by separating the construction process from its representation. This pattern enables the polymorphism by providing an effective solution for creating different forms of an object while using a consistent construction process. The […]

Read More

how hashmap works java

HashMap in Java

What is Hashing? Hashing is a mechanism to convert one value to another. The process which performs this transformation is called the ‘Hash Function’. The input to the hash function is normally called as the ‘Key’ and this could be any value which can be converted to a String. The output or the hashed value […]

Read More

The Factory Method Design Pattern

What is Factory Method Design Pattern? Gang of Four categorizes the factory method design pattern as a creational pattern since it deals with object creation.  This pattern enforces the loose coupling and encapsulation principles in object-oriented programming. This pattern applies in situations where there are sub-classes involved, and the creation of those becomes complex with […]

Read More

Multi-Release JARs in Java 9

While developing Java-based solutions, one would have to often include third party libraries to code better. These third-party libraries usually release different releases according to the support matrix they have. This would result in having different library versions targeted for different Java versions. As a result, it would be difficult to ensure that everything works […]

Read More