So as you can see here I made this up object this checkbox here a listener to the clicks that the user
make.
So whenever that they actually click on the checkbox a dismembered is going to be called said unclick
listener.
OK.
So inside of this on Comerford I can just put in my own quotes.
So first of all I want to actually create an if statement.
And inside Apprentice's I can just typing C is X..
Healthy Yes that is checked.
So now I need to actually open and close this statement by using these curly braces.
So now what's going on.
As you can see here first of all I created an if statement.
OK.
And inside Apprentice's of this if statement I specified a condition first I actually referred to the
name of this see as healthy as object as you can see here.
OK.
So and then I actually called this is checked my effect on this object.
So this method actually returns a boolean value.
OK true or false.
So as you can see here when I actually check this checkbox here.
Now as you can see the value of this checkbox is true.
OK.
And when I actually check of this checkbox the value of this checkbox is false.
OK.
So that's the job of this method.
Well I actually called this is checked method on does see it.
Healthy Yes object.
I am actually specifying the value of this checkbox.
OK.
So if I actually check this checkbox and if I actually if the value of the checkbox is on.
Now this method actually returns the value true.
But if you actually check off this check check box.
Now this method actually returns the value for this.
OK because I actually checked of this checkbox.
OK.
So this method actually returns a boolean value.
True or false.
And that value is actually determined by actually check checking on or checking of the check box.
OK.
So here I am actually specifying that if they return the value of this checkbox is true if the check
box is on OK or if the value of this checkbox is true.
Now I can actually put in my own codes inside of this statement see X healthy no.
So now I am actually fairly end to the name of this object see as healthy no object to that to the name
of this check box here OK.
C S S Helfen no doubt set checked Fahd's.
OK so when I actually check this checkbox.
So if the value of this checkbox is true the value of this checkbox must be false.
OK.
So that's why I actually created this statement here.
Here I am.
I am actually specifying that if the value of this checkbox is true the value of the tick box must be
false.
OK.
So for example imagine that I actually checked this checkbox here and now as you can see I created a
set unclick listener for this see as a healthy Yes object.
OK.
So now as you can see the value of this checkbox is true.
OK.
I actually checked this checkbox.
And now if I actually check this checkbox as you can see the value of this.
And now if we actually take this checkbox the value of these checkbooks must be false.
So let's actually run our project and test this code.
OK.
As you can see now our application is actually running on this emulator.
So here let's actually check this checkbox here.
As you can see let's check this checkbox and here as you can see I actually made this checkbox a listener
to the clique's that the user make.
OK.
And inside is unclear.
Mefford I actually created an if statement and then I actually referred to the name of this checkbox
and then I called.
This is checked Meffert on this object.
And this if it returns a boolean value.
True or false.
If this if the value of this checkbox is true that this returns the value true and if this and if the
value of this checkbox is false this method actually returns the value of once.
And here I am telling that if the value of this checkbox is true if you actually click on this or checkbox
and this checkbox returns the value true to me and then I can actually execute this line of code here
C-h X Helfen know that said check it for us.
So this means this means that this checkbox is going to be checked off.
OK.
So let's actually check this check box here.
As you can see now this check box is actually checked off.
OK.
So hopefully that makes sense.
So now let's actually make this checkbox a listener to the clicks that they use and make.
Because now if we actually click on the check box here.
Now as you can see if these two take box are checked on.
So let's actually create a set and click listener for this checkbox.
And here after this after this.
So then click listen for this.
See as a whole for Yes I can actually refer to the name of the C as x Helfen no object data said unclick
listener new view that unclick listener.
Now as you can see inside this unclick my friend I can actually put my Ancoats.
So if H x Helfen no dot dot is checked inside the curly braces.
I can put my Ancoats see x x healthy Yes that said checked Fahd's.
OK.
Again I am actually making this object this checkbox.
Or listening to the clicks that the user make.
And then I am inside this unclick my faith.
I created an if statement.
And here I am telling the computer that if the value of this checkbox is true if the returned value
of the second box is true or if this checkbox is on and an inside the curly braces Please execute this
line of code here.
S.H. exhale for years.
So this object must be checked off OK.
The value of this check checkbox must be off ok must be false.
So let's actually run our project and test our code.
OK.
As you can see now our application is actually running on this emulator here and here.
If you actually check this check box here.
Now as you can see the value of this checkbox is true.
OK.
And if I actually check this checkbox Let's see what happens.
Now as you can see the value of the check box is true and the value of this checkbox checkbox is false.
Let's actually check this check box again.
Now the value of this checkbox is true and the value of box is false.
So hopefully that makes sense.
And let's go back inside this main activity that you have a fight here.
And inside this uncreate Smurfette that is.
Let's actually continue adding some more quotes.
OK now let's actually create a pulley and valuable bullion.
Am I healthy.
OK.
And then I put an assignment operator here and then I can actually assign a value to this variable for
example follows.
Ok so now let's actually create an if statement here.
OK.
So if and then inside Apprentice's I can specify a condition.
So if am I healthy.
OK if am I healthy and then I need to actually open and closed this if statement by using these curly
braces.
So as you can see here inside these are prentices I am actually specifying that if the value of this.
Am I healthy is true then I can actually put my statements inside of this statement.
If the value of this.
Am I healthy boolean value bet is true.
So now you can see the value of this boolean variable is false.
OK.
And here inside Apprentice's of this statement I am specifying that if the value of this am I healthy
boolean value but is true then please execute the lines of code that are inside of this if statement.
So here I can just type in C is X Hellfires that said check it.
True.
OK so now let's actually do an art project and see what happens.
OK.
As you can see here now our application is actually running on this emulator.
And as you can see here none of these checkboxes are checked.
OK because I specified that if the value of this.
Am I healthy valuable is true then execute these lines of code inside the inside this IIF statement.
OK so remember let me actually tell you an important point about a boolean boolean value ability in
Java.
So here as you can see I just referred to the name of this boolean variable and this means that if the
value of this boolean variable is true then execute these lines of code here.
OK.
Now let's actually create an ELSE IF statement here else.
If the value of these are my help is valuable is not true.
OK so I put this exclamation mark here in order to negate the value of this boolean variable.
OK.
So if the value of this.
Am I healthy valuable is not true then it is false.
OK.
So as a result it is false.
Ok then execute the lines of code inside of these curly braces.
See chicks.
Helfen no.
That said checked true.
OK.
And this means check this check box here.
There's no checkbox.
So let's actually run our project and see what happens.