Multiple choice technology programming languages

  1. Does 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 from unused objects, but it doesn't prevent out-of-memory errors. If you create objects faster than GC can collect them, or if you have memory leaks (unintentional object references), the program can still exhaust available heap space. GC is a management tool, not a memory guarantee.