Multiple choice technology programming languages

Garbage collection guarantee that a program will not run out of memory.

  1. True

  2. False

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

Garbage collection reclaims memory occupied by objects that are no longer reachable, but it does not guarantee that a program will not run out of memory. If a program maintains active references to unused objects (memory leaks) or requires more memory than allocated, an OutOfMemoryError will occur.