Skip to content
Sharp

Memory Management · interview question

Which JVM tool can be used to capture a snapshot of the heap for analysis?

Multiple choiceMediumchapter-14-curatedpremiummemory-managementstack-vs-heap
Choose one answer
Answer and explanation

Correct answer

A. Jmap

Why

The jmap tool is used to generate heap dumps and obtain memory-related information about Java processes. It can help in diagnosing memory leaks and understanding memory usage patterns.

Test yourself on Memory Management

A free test with instant, explained results. No account needed.

Start free test
All Memory Management questions →