What is the purpose of the finalize method in some OOP languages?
A) To prevent a class from being subclassed.
B) To create a static method.
C) To perform cleanup before an object is destroyed.
D) To define an abstract method.
Answer: C) To perform cleanup before an object is destroyed.
Explanation: The finalize method is a special method that can be overridden in some OOP languages (like Java) to perform cleanup operations just before an object is garbage collected. It allows for the release of resources (like file handles or network connections) that the object may be holding.