怪我咯2017-04-17 16:55:06
All objects have one
protected void finalize();
Method. Is inherited from Object
. This method is called before the object is recycled. You can rewrite this method and print the current time in it.
As for the creation time, just print it in the construction method.