摘要:
Inobject-orientedandfunctionalprogramming, animmutable objectis anobjectwhose state cannot be modified after it is created.[1]This is in contrast to amutable object, which can be modified after it is created.Immutable objects are often useful because they are inherentlythread-safe.[1]Other benefits 阅读全文