Why String Are Called Immutable Data Type ?

user image

Muskan Anand

2 years ago

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.

Recent Doubts

Close [x]