Override toString to be able to print an object in a readable way when it is later read from a file.
Sorry, could not resist. Seriously, toStrings are valuable for redefinition for any Java class. However, I would bet on DTO, in particular, it is good to have toString, because the object is designed to transmit data. Often this means printing data in a readable format.
source share