Explain the JVM memory model and its components.
What is the heap memory in JVM, and how is it used?
What is the stack memory in JVM, and how does it differ from heap memory?
What are thread stacks in JVM, and how are they managed?
What are memory leaks in Java, and how can you prevent them?