1) Introduction We are going to look at how to implement the Strategy Design Pattern in Java. Then, explaining how to leverage Java 8 features to reduce code verbosity. The Strategy design pattern is a behavioral design pattern. This can use for change the behavior of algorithm/logic at runtime.
Singleton Design Pattern is one of GOF (Gang of Four) design pattern. It comes under creational patterns. The main idea behind the Singleton is, create only one object of a specific class is ever created. There are couple of ways to implement the Singleton design pattern in Java with their own pros and cons. But the […]