[concurrency-interest] Why String is immutable?
dholmes at dltech.com.au
Wed Sep 14 07:39:35 EDT 2005
Primarily for security purposes. It assures that given, for example, a
security check that you can access a file of a given name, that the string
is not concurrently modified to represent a different file between the
security check and the actual opening of the file.
It also makes it easy to share strings without having to worry about someone
accidentally or maliciously changing the string - such as constant values.
From: concurrency-interest-bounces at cs.oswego.edu
[mailto:concurrency-interest-bounces at cs.oswego.edu]On Behalf Of Bharath
Sent: Wednesday, 14 September 2005 7:40 PM
To: concurrency-interest at altair.cs.oswego.edu
Subject: [concurrency-interest] Why String is immutable?
Could anyone tell me why String is immutable?
I Blog at http://jroller.com/page/bharath
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Concurrency-interest