123
rated 0 times
[
130]
[
7]
/ answers: 1 / hits: 19521
/ 14 Years ago, fri, october 15, 2010, 12:00:00
We have a lot of objects for which we like to implement a simple toString
to output attributes of the object. Some of these attributes may be complex objects themselves.
Is there any standard, or simply just a best practice for a style? I'm thinking something like:
[SimpleClassName] { prop1:value, prop2:value }
In which case a nested value would look like:
[SimpleClassName] { prop1:value, prop2:[NestedObject] { prop3:value}}
We are using Java but I find myself asking the same question in most languages!
More From » java