As you can see here here I said that if the value of this face value it is equal to number one then
go inside of these curly braces and execute this line of code here he the number of on.
So here I am actually referring to the name of this text view the x number one.
OK Dot said.
So you want to actually output some text to that text view OK occurrence.
So here this is the name of our R.A. Dickey that we actually created here.
OK.
Occurrence sup face now.
So for example the value of the space is number one and then it's going to go inside of this array.
OK.
And it is going to find the value that is inside of the index number one.
OK.
And then it's going to outwits that value to the screen.
So here remember that we actually created a for loop and here you are actually manipulating the values
that are actually inside of that.
OK here I am saying that go inside of the round not index and increment the value that is inside of
that index.
OK so now let's actually run our project and see what happens.
So here as you can see our application is actually running on this emulator.
So now let's actually click on this or roll the dice button here.
As you can see now it's going to take some time in order to actually perform some complex calculations.
OK.
It's going to actually execute this for a loop here as you can see.
So now this is the value that we can see here.
OK.
If this number of times this value is actually shown here.
OK.
So we can see that the value that is inside of the index number one is this number of types.
OK.
Is this why do you keep the value that is inside of the index number of one of these Aure is this value.
OK.
So hopefully that makes sense.
This actually create other statements here if face is equal to number two.
OK here I can just say Pontiac's the dice.
Number two that Septic's occurrence.
OK.
So up face now plus two double quotes.
OK.
If I can just type in face is equal to number free
DXi number free.
That said text occurrence sup face now plus two double quotes if face for Islam is equal to number four.
OK.
Takes the number four takes the dice.
Number four Dart said text occurrence.
Face Nahm plus two double quotes if face is equal to number five takes the number five takes the dice
number five.
That said text occurrence face Nahm plus two double quotes if face is equal to number six status.
Number six.
That said text occurrence face Naam plus two double quotes.
So now let's actually on our project and see what happens.
So here as you can see our application is actually running on this emulator.
So now let's actually click on the spot in here.
Roll the dice.
So now again this can actually take some time in order to actually perform these accurately complex
calculations it can actually execute this for loop.
So here as you can see we can see these values.
Ok the value that is inside of this index number of one of these are right is this value number 2 and
so on.
OK so hopefully that makes sense.
And let's actually go back and say this main activity double file here and let's actually comment out
this if statements here.
Let's actually use switch statements here.
Switch OK.
Face numb OK.
Here I am actually using the switch statement in order to actually output the correct values to the
screen.
OK so this time I am saying that switch between the values of these face value.
OK so now here I can just type in case number one colon.
OK if the value of these face no valuable is number 1 OK DX the dice number 1 that set text.
Ok occurrence sup face numb OK plus two double quotes OK and then break.
So now let's actually run our project and see what happens.
OK so now click on this.
Roll the dice button here and now again it can actually perform some complex calculations.
So now we can see this value here.
OK.
As you can see this value is the value that is inside of the index number of one of these arii.
OK of this occurrence.
OK so now I can just put the other cases here so I can just type in case number two colon takes the
dose number two.
That said text occurrence sup face Nahm plus two double quotes break.
OK.
Case number 3 colon DX the dice number free dot Septic's occurrence sup the face numb OK plus two double
quotes.
Break OK.
Case number 4 colon DX the dice number for that Septic's occurrence sup face Nahm plus two double quotes.
Break case number five colon DX the dose number five that said text occurrence face Nahm plus two double
quotes.
Break.
Case number six.
Colon takes the dose number six.
That said text occurrence.
Sup face.
Plus two double quotes OK and break.
So nounless actually run our project and see what happens.
OK now as you can see our application is actually running on this emulator.
So now let's actually click on this.
Roll the dice button here and again it can actually take some time in order to actually execute this
for loop 5 million times.
So it's actually taking some time.
And then we need to actually wait.
And here we can see the values here.
OK so hopefully that makes sense.
Let's actually go back and say this main activity that will fight here.
Main activity.
Double file here.
And let's actually comment out this switch statement here and here I am trying to use encapsulation
in order to actually output those values to the screen.
OK so now let's actually create a method here.
OK so.
So the access modifier of this method is private.
Private.
OK.
And this nymphet returns nothing.
So void the return value of the second if it is void and the name of this method is.
Put the right value to the textfield.
OK and here I want to actually specify some arguments for this method.
So here inside Apprentice's I want to actually specify that this Smurfette is going to accept accept
arguments.
OK so the first argument that this pervert is going to accept is of type.
Takes few takes a view and the name of this argument is for example TXI the dice
take the second argument that this nymphet is going to I said is actually an array of integers.
So here I can't just type in it a pair of brackets and the name of this Aure is for example occurrence
OK come on.
OK.
And here again I want to actually specify the index of this arii.
So it index OK.
And then I need to actually open and close this benefit by using these curly braces.
And here I can't just hoping to 60 dice number here I am referring to the name of the stakes the argument
that said text.
And here I can just refer to the name of this array occurrence.
OK.
Sup index.
OK.
Plus two double quotes here.
I am actually referring to the name of this argument occurrence.
Sub index.
OK so here is say that this uncle my friend I can actually create another so each statement face numb.
OK.
And then I can actually open and close the switch statement by use by using these curly braces.
And here I can't just type in case one if the value of this face nobody above is actually one.
OK.
Put the right value to the text.
So here I need to actually specify free arguments for this if it.