[solved] Strings are immutable. Array vars are mutable. But what about String data in an Array?

I think strings are immutable, regardless of whether they are items in an array or not. What you have done is replace an item in the array, which was a string, with a new item, which just happens to be a different string, You haven’t altered the original string, you’ve only altered array items both of which happened to be strings.

4 Likes