Class destructor

protected void finalize(){ super.finalize(); }

This class method is used by the garbage collector to clean his used resources *¹. Do it like this:

objectName = null;
Runtime r = Runtime.getRuntime();
r.gc();
r.runFinalization();

Continue reading “Class destructor”

Advertisements

What is a Class?

A class is nothing by itself. It’s only an explanation of a new thing, like in a dictionary every word has his own definition.

It’s a mold and from where you can make a new Object.

Create a website or blog at WordPress.com

Up ↑