Roger, I don't think there's any way of directly knowing the "size" of an object in
Java. (Someone please correct me if I'm wrong.)
If you are comparing objects you can use the == operator (identity) or equals method (equality, however defined for the given object), depending on what you're after.
If you need to know what the class of a given object is, you can use the instanceof operator (or in some cases you may want to use the class's Class object).
[ June 26, 2002: Message edited by: Michael Matola ]