Cognizant Interview Question

Q. What is the difference between Singleton and Immutable object

Interview Answers

Anonymous

May 20, 2021

Immutable class also doesn't mean you cannot create more objects of the same immutable class. For singleton, usually one instance per JVM is necessary for it to be called singleton.

Anonymous

Dec 22, 2015

Singleton object will have only one object and multiple states and Immutable object will have each new object with each time the state is changed

3