Originally Posted by
Norm
The toString() in the posted code does not override the default toString() method. It is very different: static, void and has parameters.
Ah, yes. I missed that in the unformatted code. I often start a class like this with a main() and some class toString() debugging, so I made the poor assumption that is what was being done. You are, of course, correct.
To the OP, in this case the method should be renamed to something useful; or if the class is intended to be used by "client" code, move the properties into the class itself and create methods to get/set them so a main() and/or toString() can be defined for testing and debugging.