Which of the folowing stements are incorrect?
A. Default constructor is called at the time of declaration of the object if a constructor has not been defined.
B. Constructor can be parameterized.
C. finalize() method is called when a object goes out of scope and is no longer needed.
D. finalize() method must be declared protected.
Answer:C
Which of the folowing stements are incorrect?
A. Default constructor is called at the time of declaration of the object if a constructor has not been defined. B. Constructor can be parameterized. C. finalize() method is called when a object goes out of scope and is no longer needed. D. finalize() method must be declared protected.
Explanation: finalize() method is called just prior to garbage collection. it is not called when object goes out of scope.