What are the default garbage collectors in different Java versions?

The default Garbage Collector in Java has evolved over different releases to improve performance, scalability, and pause-time behavior. Earlier Java versions prioritized throughput, while modern versions focus on balancing throughput and low-latency requirements for enterprise applications.

Key Points

Default Garbage Collectors by Version

Java 5 – Java 8

Java 9 – Java 10

Java 11 – Java 17 (LTS)

Java 18 – Java 24+ (Latest Stable Releases)

Other Available Garbage Collectors

Example

A Java 8 application will use Parallel GC by default unless configured otherwise. The same application running on Java 17 will automatically use G1 GC, benefiting from better pause-time management and scalability.

Interview Tip

A concise interview answer is: Parallel GC was the default collector from Java 5 through Java 8. Starting with Java 9, G1 GC became the default and remains the default in modern Java releases because it provides a good balance between throughput, scalability, and predictable pause times. For specialized low-latency workloads, ZGC and Shenandoah are available as alternatives.

Last updated: 16 July 2026

Previous question: Can you explain all garbage collectors up to Java's latest stable release?

Next question: What performance optimizations have you done in your Java project?

More Core Java - Level V (Expert) interview questions

All Core Java - Level V (Expert) questions