Hello this is Martez awkward and it is actually all we're going to actually work on this clear about
it.
So let's go inside our country a little class and before you incur the price of this calculator class
we're going to create a method.
So private voyde and the name of that effort is going to be clear tacts.
So I want to put apart apprentices here and I want to open and close this method by using these curly
braces.
So here first of all we said that this number at liff assignment operator an interesting value is Thring
number and right.
Assignment operator two coats empty string where you get ready to assign a number to zero to the calculations
result variable.
And then semicolon for the current number we are going to also assign an interesting value.
And for the current OPERATOR You're going to assign the value to this variable for that it still results
takes you.
You are going to set a value number zero.
As the initial value.
And for the calculations valuable for the calculations string variable you're likely to assign an empty
string value.
And for that use the calculations takes you are going to assigned an empty string that you all for example
as we can just put number 0 here.
That's it.
So now of we can actually call the Smurfette from the PTEN clear case statement inside our switch statement.
So let's scroll to the top.
And here we have a number.
So let's scroll down here.
We have this pretty clear case became clear so we can see a clear path.
That's it.
Let's run the app.
Let me show you the emulator.
So for example Number five multiplied by two equal to number 10 plus six equal to 16.
So I want to for example clear everything.
Now everything is cleared and here we can see for example Number five multiplied by two equal number
10.
Right.
So now you can see that the clear button is actually executed.
But here when I clicked on the XTi clear you can see that inside this takes the calculations there is
no actually number zero here.
Right.
And that's because of this on my face here because let's take a look at this ugly method here.
At the end of this Arncliffe effort after this statement is executed.
We're saying he makes the calculations that said text calculations 3.
So before we actually assign a number to zero as the value of this takes you here we are actually the
MT-NW the value of the calculation is stunning.
So let me show you my friend.
You can see that we assigned an empty string value to this value.
So that's why you can see this number zero here.
So let me actually did it this number zero here as the value of the set.
And that's just a sign an empty string value as the value of this text takes you here.
And if you want to you can just delete this line of code because we just set the value of the calculation
string as the value of the ticks the calculations are in.
Inside the unclear method regardless of the switch statement so we can just delete this line of code.
And if you want to put number 0 as the value of that is the calculations we can just assign the value
number zero inside the two codes to these valuable calculations.
So let me show you the applicant.
Let's run the at now.
For example you can see number zero he has a five multiplied by free equal and plus two equals.
So let's get the clear.
Now you can see this clear within here.
So again eight multiplied by two equals Sixteen plus four equal to any divided by two equal or ten minus
five equal five multiplied by four equal to any.
So you can see that our calculator application works perfectly.
So that's it that's enough for this application.
And I think this was the last application that I actually uploaded to this course because of we cannot
add more than five hundred and fifty lectures to the course and we already reached that limitation.
So if you have any questions about actually creating Android applications about anything in Android
regarding creating Android applications or Java please post the discussion in the course and then I
will do my best to answer all of your questions.
Thanks very much for watching again and hope to see you again bye.