Multiple choice technology programming languages

Which is false about garbage collection in java

  1. the heap space occupied by an un-referenced object can be recycled and made available for subsequent new objects

  2. When the total memory allocated to a Java program exceeds some threshold the garbage coollector is invoked

  3. the program does not suspend during garbage collection

  4. garbage collection requires extra memory

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

Java garbage collection typically suspends all application threads during the collection phase, causing 'stop-the-world' pauses. This is necessary to safely identify and reclaim unreachable objects without concurrent modifications.