Immutable Data Types

If the values of a data type never change their state, then we say the data type is immutable.

The exact integers of Scheme form an immutable data type.

The double precision floating point numbers of Java and many other languages form an immutable data type.

The String data type of Java is immutable, but the string data type of Scheme is mutable.

The ArrayList data type of Java is mutable. Adding a new element to an ArrayList changes its state.

For debugging: Click here to validate.