Skip to content
Sharp

Performance Tuning · interview question

What can cause a java.lang.OutOfMemoryError: Java heap space?

Multiple choiceEasychapter-14-curatedpremiumperformance-tuningoutofmemoryerrors
Choose one answer
Answer and explanation

Correct answer

C. The application fails to free up memory in the heap.

Why

An OutOfMemoryError: Java heap space occurs when the application uses more heap memory than is available, and the garbage collector cannot reclaim enough space to satisfy memory allocation requests.

Test yourself on Performance Tuning

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

Start free test
All Performance Tuning questions →