Skip to main content

Posts

Showing posts from August, 2026

Java & Spring Interview Questions: What Really Happens Under the Hood

  Java & Spring Interview Questions: What Really Happens Under the Hood There is a phase in every developer's career where you can use something without actually understanding what is happening underneath. You know how to use ConcurrentHashMap . You know what @Transactional does. You know that Spring injects dependencies. You know @SpringBootApplication starts your application. And then the interviewer asks: "Okay, but what actually happens internally?" Suddenly, knowing the syntax isn't enough. That is exactly what this blog is about. I'm going to break down some of the Java and Spring concepts that are frequently asked in interviews, but more importantly, I'll try to understand why they work the way they do . Let's start with one of my favourites. 1. ConcurrentHashMap in Java 8: What Actually Happens? Let's first establish the problem. A normal HashMap is not thread-safe. Imagine two threads doing this at the same time: map.put("A",...