Hello and welcome to the goal and putting it on language course in the previous session, we talked
about yesterday in lead roles and in this session, we want to talk about the other extreme concept.
As strings are immutable.
Ingo, language is strings are immutable that once is Estrin is created, the value of this string cannot
be changed.
Or in other words, it strings are read only if you try to change the value the compiler will through
any rule of.
Now, let's go to this court, bring it on to illustrate that extremes are immutable.
First, create and initialize a variable with a string using shorthand declaration for the exam to define
a variable like value calling equals shorthand declaration and set value for this value that valid prior
to the programming language.
Now displayed is variable f p value, reformat the code, save the project and execute the program.
Now we can see the output.
Welcome to go programming language.
What we want to change one of character of value string for the example, we want to change index number
one to g character.
Now write
value index number one equals back text g.
If you trying to change the value of this ring, then the compiler v2 and they're all you can see cannot
assign to value number one.
So we set common for this code and we cannot change a value of a string variable because it is immutable.
In order not to prolong the time of decision, we'll finish it and we will continue the content in the
next session.
Goodbye.