Java Zero to All All questionsPractise free
Interview questions › Interview Rapid-Fire — Top Q&A › JVM Internals — Top Interview Q&A

What triggers a Full GC?

Level III · MidJVM Internals — Top Interview Q&A
Short answer

A Full GC collects the entire heap (young + old + often Metaspace) and is usually the most expensive pause.

Explanation

Common triggers: the old generation filling up (promotion failure or an allocation that cannot be satisfied), Metaspace exhaustion, an explicit System.gc() call, and in G1 a concurrent-cycle failure that degrades to a full collection. Heap fragmentation and undersized heaps make them frequent. Frequent or long Full GCs are a red flag for leaks or misconfigured sizing.

Common mistakes
  • Saying System.gc() always triggers a full GC.
  • Not mentioning old-generation exhaustion and Metaspace.

Can you say this out loud in two minutes? Drill it in a timed mock interview, with flashcards and runnable code for JVM Internals — Top Interview Q&A.

Practise free

More on JVM Internals — Top Interview Q&A