• Maven Dependency Scopes

    Maven dependency scopes defines the scope/boundary/availability of the dependency at various contexts like compile, test, and run. There are 6 scopes. compile Default scope of dependencies in Maven. Available at compile time and runtime. When preparing self-contained fat jar,...
  • Abstract Factory Pattern

    It’s a creational design pattern in which related products are grouped together whose behavior depends on their family, and the family factories creates objects of those related products. Purpose: Similar purpose as Factory Pattern i.e., program to interface, not...
  • Factory Method Pattern

    It’s a Creational design pattern that focuses on object creation process wherein creating product objects is the responsibility of the respective creators. There are 2 parallel class hierarchies defined in this pattern i.e., products and creators/factories. Purpose: Program to...
  • Builder Design Pattern

    It’s a Creational design pattern that provides a way to construct complex objects by separating object construction from its representation, so that same construction process creates different representations. For example, you can have a car with different types of...
  • NPE while AutoBoxing

    Auto-boxing and Unboxing is a feature of Java which allows us to assign primitives to wrappers and vice versa. But, at times while boxing there could be a chance of NPE if null checks are not done. Auto-boxing: Double...