OK everyone.
Now let's actually go back inside this main activity double file here and now we're going to actually
put some lines of code here.
OK.
Now we want to actually output the value that is inside of the index 5 of this away.
So this is the index zero index one index to index free index for.
And this is index 5.
OK.
So now here again just putting this line of code here.
So as you can see here TXI the original element that's a text string add a sub in the ex-wife.
OK.
So this piece of code here is going to actually give me the value that is inside of the index.
Five of these screen Arey here as you can see.
So another section is on our project.
OK.
Now as you can see here our application is running on this emulator.
So here if we actually scroll down the screen here you can see this value here.
OK.
If the letter if.
OK.
What do you do not add every element value is dollar sign.
OK.
So here because we actually modified the Auret devalues that is actually the inside of the ARII here
in line 40 as you can see here we actually called these Let's modify the array method here.
So because we modified the values that are actually inside of this are we now the leader if is actually
preceded by actually a dollar sign here.
OK so now let's let's actually go back and say this main activity that job fight here and here I want
to actually manipulate a specific element that is actually inside of these three elements.
OK.
So let's actually create a method for that job.
OK.
So again the access modifier of if it is public the return type of RMF it is void.
So this means that RMF it is going to actually return nothing.
OK.
And the name of RMI if it is let's modify element OK.
And here inside of the practice's I need to actually specify an argument for the Smurfit so that the
data type of argument is strange.
OK.
And the name of our argument is element.
OK.
And then I need to actually open and close this method by using these curly braces and inside this method
I want to actually manipulate these element values so I just need to refer to the name of this element
argument.
OK.
Assignment operator and here inside the double quotes I can just type in and sign hash tag.
OK.
Plus element.
OK so as you can see here I actually put this value here inside of these table codes here before this
element here.
OK.
Before this element of argument and now I can actually output this value the element value to this screen.
OK so I can't just type anti-X the.
So as you can see here I want to refer to one of these objects here as you can see to the modified array
element.
OK.
And as you can see here inside of these let's modify elements I cannot refer to this object.
OK because this object this to this takes view is actually it created inside of these uncreate Smurfit.
OK.
And we cannot actually refer to a valuable to add to an object that is actually created in another method.
So here I can just declare this object so I can just copy this takes beauty actually modify every element
here and then I can just put it inside of this class and then I need to put in a semicolon here.
OK.
And then I can just delete this takes you here.
OK.
In this way we declared this takes you inside of this class and here inside of this uncreate method
you are actually instantiating this object.
OK.
TXI the modified array element.
And now inside of this let's modify elements I can totally fair to that object as you can see here takes
the modify R8 element.
So let's actually test and see what happens.
Let's modify three elements so I can refer to the name of the text you now.
OK.
That said text element.
And now let's actually call this method here.
Let's modify element.
So now I need to actually provide a value as an argument for this method.
OK.
So as you can see the data type of my argument is strange.
OK so I need to actually provide a value of types 3.
So here I can just refer to the name of this thing a sub index.
OK so in this way I can actually get this value.
OK.
The value that is inside of the index five of this.
So as you can see this value if a newline character.
OK.
And here I can just put it here.
String already sup in the.
OK.
So let's actually run our project and see what happens.
So now as you can see our application is actually running on this emulator.
And here if we actually scroll down the screen here I want to actually see this value here a modified
array element at sign.
Hash tag dollar sign.
OK so now I want to actually output the value of every element after modification.
OK.
So after the modified added element as you can see this is this area is now for example modified.
OK so now again I want to output the original value that is inside of the index five of these three.
OK staring at it.
So let's see what happens.
And here after this line of code here.
So just type in here takes the element after the modification.
OK that said text string and a sup in the ex-wife and now it's actually an art project and see what
happens.
So now our application is actually running on this emulator.
And now if we actually scroll down the screen here let's see what happens.
So as you can see here value of the element after modification is dollar sign F..
OK so the most important point I want you to actually know is that when ever we actually modify the
values that are actually inside of an array as we did in line 42 Let's modify the error here elements
that are actually inside of that array are going to be modified ok forever.
OK.
Because when we actually create an array you are actually creating a reference to some objects to some
value inside of the memory.
OK.
And when we modify that array the values that are actually inside of that are they are going to be modified
too.
OK.
But when we actually modify a specific element that is actually inside of an array as we did here.
OK.
Let's modify element OK.
Only a copy of that modified element is going to be created.
OK.
And then that value as you can see on this emulator here.
This is that why you sign hash tag dollar sign.
OK.
But the original value is not changed.
OK because we only modified our specific elements that is actually inside of that of that array.
OK.
And as you can see here value of array element after the modification is dollar sign.
So then if we actually create an array we are actually creating a reference to that Ari.
So that's why the values that are actually inside of this are actually modified.
OK.
So hopefully that makes sense and I think that's enough for this tutorial.
And if you have any questions please post the discussion in the course and I'll do my best to answer
your questions.
And thank you very much for watching and I'll see you in the next tutorial.