Multiple choice technology programming languages

Which of the following helps in garbage collection?

  1. final

  2. finally

  3. finalize

  4. finalizer

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

In Java, the finalize() method is called by the garbage collector on an object before garbage collection reclaims its memory. The 'final' keyword is for constants, 'finally' is a try-catch block, and 'finalizer' is not a standard Java term.