Frage im Vorstellungsgespräch bei Publicis Sapient

what is singleton design pattern, what are immutable classes.

Antwort im Vorstellungsgespräch

Anonym

18. Aug. 2017

An immutable object is initialized by its constuctor only, while a singleton is instantiated by a static method, restricts the instantiation of a class to one object. This is useful when exactly one object is needed to coordinate actions across the system

1