Garbage? GARBAGE?!
As Amber pointed out, JDate doesn't define a toString() method, so the toString() method of its superclass (Object) is what gets called.
According to the Java API documentation, the toString() method of Object:
...returns a string consisting of the name of the class of which the object is an instance, the at-sign character `@', and the unsigned hexadecimal representation of the hash code of the object. In other words, this method returns a string equal to the value of:
getClass().getName() + '@' + Integer.toHexString(hashCode())
And the hashCode() method of Object:
...As much as is reasonably practical, the hashCode method defined by class Object does return distinct integers for distinct objects. (This is typically implemented by converting the internal address of the object into an integer, but this implementation technique is not required by the JavaTM programming language.)
So System.out.println( testJDate ) gives you the fully qualified class name of JDate plus an "@" plus a representation of the memory address where the object (its reference?) is stored.
[This message has been edited by Michael Matola (edited June 26, 2001).]
[This message has been edited by Michael Matola (edited June 26, 2001).]