How to pass variables to overridden toString() method?

前端 未结 4 1820
孤独总比滥情好
孤独总比滥情好 2021-01-21 08:43

Is it possible to pass in a bool variable into an overridden toString() method, so it can conditionally print the object in different formats?

4条回答
提交回复
热议问题