In this article, we will look at one of the most common (and simplest too) design patterns: Factory method design pattern.
Design patterns: Singleton pattern
There can be requirements when we need variables to maintain data for the system (like some global parameters) or need to call methods from the class without creating a new instance of the class every time. One solution to these situations will be to use static fields and methods. But with static, you can not inherit the methods or variables from another class or interface. Because of this, you...