“One of the Most Expensive Java Bugs Starts With ==”
Most developers know:
- == compares references
- .equals() compares values
But very few actually understand what’s happening inside JVM memory.
In this video, I break down:
- how the String Pool works
- why "Hello" == "Hello" returns true
- why new String("Hello") changes everything
- how Java reuses references internally
- and how this tiny mistake silently causes production bugs
We’ll even visualize:
- heap memory
- pooled strings
- object identity
- and intern() behavior
Once you understand this, concepts like:
- HashMap internals
- caching
- immutability
- Hibernate equality
- and JVM optimizations