Whenever you're ready, walk me through how you'd approach this.
Explain how memory management and garbage collection work in Java.
Focus on how objects are allocated, how the JVM decides what is collectible, and what garbage collection actually does at runtime. Keep the answer to Java SE and the HotSpot JVM, and explain the practical impact on latency and memory leaks.