CHAPTER 12: Execution Previous
Previous
Java Language
Java Language
Index
Index
Next
Next

12.7 Finalization of Classes

If a class declares a class method classFinalize that takes no arguments and returns no result:

static void classFinalize() throws Throwable { . . . }

then this method will be invoked before the class is unloaded (S12.8). Like the finalize method for objects, this method will be automatically invoked only once. This method may optionally be declared private , protected , or public .

© 1996 Sun Microsystems, Inc. All rights reserved.