Multiple choice technology programming languages

Can we invoke the garbage collector explicitly?

  1. Yes, but the actual collection is not deterministic

  2. No.

  3. Yes, and the actual collection is deterministic

  4. I don't know.

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

Garbage collection can be requested explicitly using methods like System.gc() in languages like Java, but the runtime environment determines when and if actual collection occurs, making it non-deterministic.