Louster
One of Freddy's beloved
- Joined
- Dec 26, 2003
- Messages
- 882
I remember a way of overriding/implementing some method for your own class definitions that would allow the customisation of what it printed when you appended an instance of that particular class to a String (or just printed it or whatever - just the automatic conversion to a String, that in most cases for me at the moment seems to be outputting the memory location or something by default), but I can't for the life of me remember what it was called and googling doesn't seem to be getting me anywhere. Is it something like show, or print, or something?
Oh, and can this same kind of thing be used for enum definitions? I'd like to be able to print something other than the literal string representation of the name of the enum elements I've defined.
Halpe.
Oh, and can this same kind of thing be used for enum definitions? I'd like to be able to print something other than the literal string representation of the name of the enum elements I've defined.
Halpe.