Question: Which of the following statements is true? Select the one correct answer. (a) If an exception is thrown during execution of the finalize() method of
Which of the following statements is true?
Select the one correct answer.
(a) If an exception is thrown during execution of the finalize() method of an eligible object, the exception is ignored and the object is destroyed.
(b) All objects have a finalize() method.
(c) Objects can be destroyed by explicitly calling the finalize() method.
(d) The finalize() method can be declared with any accessibility.
(e) The compiler will fail to compile code that defines an overriding finalize() method that does not explicitly call the overridden finalize() method from the superclass.
Step by Step Solution
3.51 Rating (164 Votes )
There are 3 Steps involved in it
b The Object class defines a protected finalize method All classes inherit from Object th... View full answer
Get step-by-step solutions from verified subject matter experts
