Mutable or immutable class?
问题 I had read in some design book that immutable class improves scalability and its good practice to write immutable class wherever possible. But I think so immutable class increase object proliferation. So is it good of going immutable class or better go for static class (A class with all the methods static) for improve scalability ? 回答1: Immutable classes do promote object proliferation, but if you want safety, mutable objects will promote more object proliferation because you have to return