Multiple choice technology programming languages

The finalize method will only be called once, if called at all.

  1. True

  2. False

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

In Java, the Garbage Collector calls the finalize() method of an object when it determines there are no more references to it. The JVM guarantees that finalize() will be called at most once per object, even if the object is 'resurrected' and then becomes eligible for GC again.