What is the role of the JVM in garbage collection?
The JVM is responsible for managing memory, including performing garbage collection to remove unreachable objects and free up memory for new objects.
Nice work! Youâ€™ve described the role of the JVM in garbage collection accurately.
Can you elaborate on how the JVM decides when to trigger garbage collection?