The general agreement for TOSTRING is:
The returned string should be a simple, rich and easy-to-read expression. It is recommended that all subclasses have rewritten this method (superclass implementation is "class name @ -curred string")
When an object is passed to the Println, the string connection operator ( ), the Assert (Java1.4 version), the toString will be called automatically. In practical applications, the toString method should return all of the interesting information or summary information contained in the object. No matter if you decide to specify the format of the return value, you should clearly indicate your intent in the document. In addition, all the information included in the TOString return value provides a good practice, which allows the program to get specific data directly, but no effort is required to resolve this string.