Security

Another benefit of string immutability is its security aspect. Commonly, a lot of sensitive information (usernames, passwords, URLs, ports, databases, socket connections, parameters, properties, and so on) are represented and passed around as strings. By having this information immutable, the code becomes secure to a wide range of security threats (for example, modifying the references accidentally or deliberately).

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset