Other Tutorials

Factory Method Design Pattern

Introduction: Factory Method pattern is one of the popular creational design patterns. It doesn’t specifically rely on a factory object to create the objects. Rather, the idea is to use a separate method in the same class to create an object. Factory Method pattern defines an interface for creating objects but lets the subclasses decide […]

One comment Read More
Other Tutorials

Facade Design Pattern In Java

Introduction: Facade means the face of a building. While passing across a street, all we look at is the face of a building. The face abstracts all the complex implementation details of a building. Similarly, a facade design pattern aims to provide a unified interface to a set of interfaces in the subsystem. This unified […]

Be the First to comment. Read More
Other Tutorials

Composite Design Pattern In Java

Introduction: A composite design pattern is useful when we have to work with a tree-like hierarchical structure of objects. It lets us treat the individual objects and the composition of objects uniformly. It falls under the category of a structural design pattern as it composes objects into a tree structure to represent part-whole hierarchies. UML […]

Be the First to comment. Read More
Other Tutorials

Adapter Design Pattern In Java

Introduction: The Adapter design pattern is a structural design pattern that helps us to connect to the legacy or third-party code that exposes a similar functionality through a different interface. A real-world analogy for an adapter is the one we use to connect our USB cable to an ethernet port. While designing an object-oriented application, […]

Be the First to comment. Read More
Spring

Spring Bean Scopes

Introduction: Spring core container instantiates beans and manages their life-cycle. While defining a bean, we can provide its scope. Unless explicitly provided, singleton is the default scope of beans in a Spring container. We have five types of bean scopes available in Spring. In this tutorial, we’ll explore each of them. 1. singleton: The singleton […]

5 comments Read More
Spring

Spring Boot YAML Configuration

Introduction: In this quick tutorial, we’ll learn how to use a YAML file to configure properties of a Spring Boot application. What is YAML File? Instead of having an application.properties in Spring, we can use the application.yml as our configuration file. YAML is a superset of JSON and we can use it for configuring data. The […]

Be the First to comment. Read More
Spring

Spring ClassPathXmlApplicationContext

Introduction: Spring provides two types of containers: BeanFactory: It supports bean instantiating and wiring ApplicationContext: It extends the BeanFactory and so provides all those features as that a BeanFactory. Additionally, it provides automatic registration of BeanPostProcessor, internationalization, and many more features The Spring container is responsible for instantiating and managing the lifecycle of Spring beans. […]

Be the First to comment. Read More
Spring

Spring Dependency Injection

Introduction: In a well-designed Java application, the classes should be as independent as possible. Such a design promotes reusability of components. It also makes it easier to unit test the various components. The concept of dependency injection promotes loose coupling among Java objects. In this tutorial, we’ll talk about the dependency injection in Spring framework. […]

One comment Read More
Core Java

Java ArrayDeque

Introduction: ArrayDeque in Java is a class that implements a Deque interface. It’s an array-based implementation of a double-ended queue. As the name suggests, a double-ended queue is a queue that allows us to add or remove items from both front and rear ends. Before we dive in, let’s quickly look at a few noteworthy […]

2 comments Read More
Core Java

PriorityBlockingQueue In Java

Introduction: A PriorityBlockingQueue in Java implements the BlockingQueue interface and supports the features of a PriorityQueue. So, what’s a BlockingQueue? Following holds true for any implementation of a BlockingQueue: While attempting to retrieve an element, a thread waits if the queue is empty In case of a bounded BlockingQueue implementation, the thread waits till it […]

One comment Read More