I'm with Fred on this one... given that this is the beginner's forum I would say that the first step would be to understand exactly how reference variables and objects interact, and to understand exactly when an object becomes eligible for garbage collection. From a memory management perspective, the single best thing you can do as a programmer is to understand how to make an object eligible for garbage collection.
Spot false dilemmas now, ask me how!
(If you're not on the edge, you're taking up too much room.)
I've worked in other languages that had a sizeOf(object) feature and we thought we really needed it to tune designs. Years of working without it in Java shows that we really didn't need it for that purpose, though I'm still curious sometimes. The Java Specialists newsletter shows how to get a pretty good estimate. I've never actually tried it, because I can't really answer the questions Fred asked.
A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi