finalize() is invoked when the garbage collector collects a Box object that cannot be accessed by any user
thread. The program runs an endless loop in which Box objects are created but no references to them are kept, so they quickly become eligible for garbage collection. As soon as the GC runs, it will collect lots of abandoned Box objects, and it will invoke the finalize() method of each one.