阅读背景:

一般认为toString()成本低是否安全?

来源:互联网 

Do you generally assume that toString() on any given object has a low cost (i.e. for logging)? I do. Is that assumption valid? If it has a high cost should that normally be changed? What are valid reasons to make a toString() method with a high cost? The only time that I get concerned about toString costs is when I know that it is on some sort of collection with many members. From: Do you generally assume that toString() on any




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: