Skip to content
Sharp

Garbage Collection · interview question

Which Java tool is used to capture a thread dump?

Multiple choiceEasychapter-14-curatedpremiumgarbage-collectiongenerational-gc
Choose one answer
Answer and explanation

Correct answer

C. Jstack

Why

The 'jstack' tool is used to capture thread dumps, which provide a snapshot of the current state of all threads within a Java process. This is useful for diagnosing issues like deadlocks and thread contention.

Test yourself on Garbage Collection

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

Start free test
All Garbage Collection questions →