when you need this only for evaluating answers for the GC questions, why don't you just modify the classes with a constructor, that count++es a static int variable for creation and an override of the finalize() method that count++es a static int variable for garbage collection? Perhaps both with a system out of a line of information?
Just a proposal, Bu.
all events occur in real time
I'm all tasted up for a BLT! This tiny ad wants a monte cristo!
Free, earth friendly heat - from the CodeRanch trailboss