Sunday, February 12, 2012

Why is string immutable in Java

1) Performance (string pooling)
2) thread safety ( we can pass around strings between threads and not worry about anyone changing it)
3) Security
http://geekexplains.blogspot.com/2009/11/why-string-has-been-made-immutable-in.html?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+GeekExplains+%28Geek+Explains%29

No comments:

Post a Comment