Top "Immutability" questions

Immutability is the inability to modify data after it has been created.

How to create Immutable List in java?

I need to convert mutable list object to immutable list. What is the possible way in java? public void action() { …

java collections immutability
Is Integer Immutable

I know this is probably very stupid, but a lot of places claim that the Integer class in Java is …

java immutability mutable
Does Python have an immutable list?

Does python have immutable lists? Suppose I wish to have the functionality of an ordered collection of elements, but which …

python list tuples immutability
Make immutable Java object

My goal is to make a Java object immutable. I have a class Student. I coded it in the following …

java immutability
Converting mutable to immutable map

private[this]object MMMap extends HashMap[A, Set[B]] with MultiMap[A, B] How convert it to immutable?

scala immutability mutable scala-collections
Swift make method parameter mutable?

How can I deal with this error without creating additional variable? func reduceToZero(x:Int) -> Int { while (x != 0) { …

swift syntax immutability mutability
Advantages of stateless programming?

I've recently been learning about functional programming (specifically Haskell, but I've gone through tutorials on Lisp and Erlang as well). …

functional-programming state immutability
Is a Java string really immutable?

We all know that String is immutable in Java, but check the following code: String s1 = "Hello World"; String s2 = "…

java string reflection immutability
How do I create an immutable Class?

I am working on creating an immutable class. I have marked all the properties as read-only. I have a list …

c# .net immutability
Immutable class?

How can one make a Java class immutable, what is the need of immutability and is there any advantage to …

java string immutability