Monthly Archives: June 2024

Concurrent HashMap – Real life use of Concurrent HashMap

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 Question for experience – Java Developer

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

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 »

Real time weather app using Angular 17

Angular is an open-source, Typescript based web application framework that runs on Node.js. In this article, we’ll learn how to create a real time weather app using Angular that retrieves weather information based on the name of the city. Steps to build real time weather app Step 1- How to create angular project in Visual… Read More »

Publish Subscribe Messaging system

In the publish-subscribe messaging system, each message has multiple consumers. Topics are based on a publish subscribe messaging model where each message is broadcast to multiple subscribers who are listening to the topic. Key feature of Publish Subscribe messaging model When to use publisher subscribe messaging model The publish-subscribe messaging model should be used when… Read More »