Friday, August 28, 2009

Why string are called Immutable data Type ?

The memory representation of string is an Array of Characters, So on re-assigning the new array of Char is formed & the start address is changed . Thus keeping the Old string in Memory for Garbage Collector to be disposed.

No comments: