A garbage collector that employs the train algorithm divides object
classes into a number of class groups, which are considered to have
different ranks. The class group having the lowest rank, for example, may
include only classes whose instances contain no references. The group of
the next-higher rank may consist of classes whose instances include
references only to objects that are instances of final classes whose
instances include no references. The highest-rank group may include all
other classes. Car sections are associated with the class groups and
contain only instances of classes belonging to the class groups with
which they are associated. Within each train, each car associated with a
class group of a higher-rank is placed earlier in the collection order
than is a car associated with a lower-rank class group.