intermediateJVM Internals & Memory169 of 436
How many types of Garbage Collectors are there in Java?
Tests whether you can name and roughly characterize the collectors -- Serial, Parallel, CMS (deprecated/removed), G1 (default since Java 9), ZGC, and Shenandoah -- and place them on the throughput-vs-pause-time spectrum rather than treating 'garbage collector' as one fixed algorithm.
Ready to master this question?
Generate a complete walkthrough — background, the full answer in plain language, a working code example explained line by line, a real-world scenario, common mistakes, and how this same question gets asked in different ways.
Sign in to generate a response