Multiple choice

What is access specifier of finalize() method?

  1. Default

  2. Public

  3. Protected

  4. Private

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

Return type of finalize() method is protected and this method is called by the garbage collector on an object, when garbage collection determines that there are no more references to the object.