When is it desired to not implement toString() in Java?

后端 未结 24 2087
心在旅途
心在旅途 2020-12-10 00:45

A lead developer on my project has taken to referring to the project\'s toString() implementations as \"pure cruft\" and is looking to remove them from the code base.

<
24条回答
  •  南方客
    南方客 (楼主)
    2020-12-10 00:57

    implement always :) As mentioned above, it is invaluable for debugging.

提交回复
热议问题