Why is it that they decided to make String immutable in Java and .NET (and some other languages)? Why didn\'t they make it mutable?
String
Immutability is not so closely tied to security. For that, at least in .NET, you get the SecureString class.
SecureString
Later edit: In Java you will find GuardedString, a similar implementation.
GuardedString