0

string and list are immutable??

5th Feb 2017, 6:09 AM
angad chiraniya
angad chiraniya - avatar
2 Risposte
+ 4
Strings are immutable, they cannot change, we can only ever make new strings . The string type value is immutable, but the String object, which is created by using the String() constructor, is mutable, because it is an object and you can add new properties to it. However, Lists values or elements are mutable, they can change without making new lists.
5th Feb 2017, 7:59 AM
Benneth Yankey
Benneth Yankey - avatar
+ 2
got it, thanks
5th Feb 2017, 8:20 AM
angad chiraniya
angad chiraniya - avatar