Author Archives: paulsofts

Demystifying Virtual Thread Performance: Unveiling the Truth Beyond the Buzz

By | June 18, 2025

What is Virtual Thread in Java? The virtual thread is introduced in JDK 21 that helps to improve the application availability, throughput, and code quality on top of reducing the memory consumption. The virtual thread concept has gained a lot of attention in recent times, and much more programming languages are trying to update their… Read More »

Controller vs RestController in Spring Boot

By | February 16, 2025

The Controller and RestController in the Spring framework are both used to handle the HTTP requests, but they have a difference in their intended use and their behaviour. Difference between Spring Controller vs RestController Controller RestController The controller in Spring typically handles the traditional web requests and produces the HTML views. RestContoller is specifically designed… Read More »

Java Memory Leaks | What is memory leak in Java?

By | January 27, 2025

In Java, when the garbage collector fails to collect some unused objects that are still being referenced internally due to the developer’s mistake, this is called a memory leak. It becomes critical overtime; heap memory may keep growing and lead to application out of memory errors. Causes of memory leak in Java There are several… Read More »

What is SQL Query optimization | Performance tuning in SQL

By | September 19, 2024

In J2EE enterprise applications, the performance of the database queries significantly impacts the application’s efficiency. Slow or poorly performed queries delay the response to the end user, decrease productivity, and eventually lead to business loss. There are various techniques that are used for SQL query optimization. In this article, we will learn about SQL optimization… Read More »

Spring Boot 3 Observability

By | September 3, 2024

What is Observability? Observability is used to observe the internal states of the application through metrics, logs, and traces and gives insight into the functioning of the application. It makes the application more transparent and easier to monitor, troubleshoot, and manage. Steps to implement Observability in Spring Boot 3.0 Spring Boot observability can be easily… Read More »

What is inter thread communication in Java example

By | September 5, 2024

Inter thread communication in Java allows the multiple threads to communicate and coordinate with each other. It helps in a concurrent environment when multiple threads work together over shared resources. In Java, we can use the object’s class methods, such as wait(), notify() and notifyAll() to achieve inter-threaded communication. Object’s monitor Monitor is the lock… Read More »

Concurrent HashMap – Real life use of Concurrent HashMap

By | June 26, 2024

What is ConcurrentHashMap? In Java, ConcurrentHashMap is a class that implements the Map<K,V> interface, and it is synchronised. When we declare a HashMap<K,V> in Java, the JVM internally assigns 16 buckets of memory to it. In ConcurrentHashMap, the lock is on each of the 16 buckets, which facilitates multiple write operations on different buckets concurrently… Read More »

Java interview questions for 5 years experience – Java developer interview questions & answer

By | January 27, 2025

1. String vs. StringBuilder | When to use String and StringBuilder in Java? Feature String StringBuilder Definition String is an immutable class in Java, which means once an object is created, its value cannot be changed. StringBuilder is used to create mutable string objects, which means we can change the content of the StringBuilder object.… Read More »

How to resolve CORS issue in Angular? | origin ‘http://localhost:4200’ has been blocked by cors policy: response to preflight request doesn’t pass access control check

By | September 19, 2024

CORS stands for Cross-Origin Resource Sharing, a security feature that is implemented by web browsers to protect users from malicious websites that try to access data on another domain without permission. It occurs when an application attempts to make a request to a different domain than the one that served the application. In an Angular… Read More »