When you try to print any object, that is not a
string, the println() method will call the toString() method of the object, in order to get the string representation, so that it can print it.
Since your Data class, did not implement the toString() method, it will inherit it from its super class. And with the Object class, the toString() method returns the name of the class along with the Identity hash for the instance.
Henry