Please explain what is immutability, what is it for and how is it codified?



Please explain what is immutability, what is it for and how is it codified?..

Answer / Devendra Kumar Verma

Immutability refers to the quality of something (like a variable or object) that cannot be modified after it has been created. It is used in programming to ensure data consistency, prevent unintended changes, improve concurrency by reducing lock contention, and simplify debugging because immutable objects don't need to be updated during their lifetime. In terms of codifying immutability, this can be achieved through the use of read-only variables or creating new objects when modifying data rather than updating existing ones.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Dot Net General Interview Questions

Please explain what is the .net framework and how does it work?

1 Answers  


What are the different types of remote object creation mode in .net?

1 Answers  


Tell us what is a variable of implicit type and what is its scope?

1 Answers  


What is WSDL and disco file ?

3 Answers   CybAge, IBM, TCS,


Explain Creational design pattern in .NET?

1 Answers  


Explain the difference between public and static modifiers?

1 Answers  


What does cil do?

1 Answers  


What is lazy initialization?

1 Answers  


Can u explain me What is encapsulation?

7 Answers   Deloitte, GK companies,


What is new in .net core?

1 Answers  


Compare client server application with n-tier application

1 Answers  


State the methods used during deserialization and serialization process.

2 Answers  


Categories