So the value of a variable is fine as you can see I didn't assign a value to this valuable.
When I created this valuable so this value comes from this value comes from this line of code here.
OK here I assigned the value of the Zed's valuable to all of my valuables OK.
As you can see so here in this line of code I specified that a assignment operator B assignment operator
C and assignment operator is that.
OK.
So actually I assigned the value of this variable which is the that variable.
Ok I assigned the value of this variable which is 5 to the variable.
And then I assigned the value of this variable to the Beaverhead table here.
And then I assigned the value of this variable to the a variable.
OK.
As you can see here and as you can see in the console the value of the variable is 5.
The value of that be valuable is five.
The value of the C variable is 5 and the value of this that Loughrea about is 5.
OK.
So you can actually assign values to your variables in this way that I showed you.
OK.
So as I said before assigning a value to a variable is an expression.
OK.
So here in this line of code for example we are assigning a value to this variable.
OK.
So this line of code is an expression OK because it produces a value.
So the right side of an assignment expression always is calculated before the assignment takes place.
So as you can see of it we actually assign a value to this variable.
For example if I want to multiply this number by for this operation here is going to be evaluated first
and then the result of this operation will be assigned to the value on the left hand side of the OPERATOR
OK.
So if I want to actually again I want food the value of this variable to the console.
So as you can see the value of that variable is 20.
Okay the right side of an assignment expression is always the right side of an assignment expression
always is calculated before the assignment takes place.
OK.
So this operation here is going to be calculated first and then the value of this operation is going
to be assigned to the value on the left hand side of the OPERATOR OK.
So this is not an equal OPERATOR OK.
This is an assignment operator.
This is very important.
OK.
Using an expression to change of variables value is a common task in programming.
OK.
Several operators are used in these cases.
So first let me actually comment out these lines of code here because I don't want to execute that.
So now let me show you some examples.
OK.
For example I want to create two variables here.
OK.
So the data type of my variable is ain't and the name of my volumen is not one.
OK.
And then I assign a value to my variable.
For example numbers 10 or J.
And then at the end of my statement I need to put in a semi-colon OK.
And here I want to create another variable in the name of my variable would be number two.
And then I assign a value to my variable.
For example number 8.
OK.
And then I need to add the semi-colon at the end of my value.
OK so now I want to show you some operators in order to change of variables value.
OK.
And in the past we wanted to actually add a value to our variable.
We would just refer to the name of our variable and then we put an assignment operator and then we referred
to the name of our idea.
And then we for example added a value to our value.
OK so let me actually output the value of this variable with the concert system.
Of that printin and then inside the parenthesis I just need to refer to the name of my variable here
and at the end of my statement I need to put in a semi-colon.
OK so if I run my project as you can see it's going to output this value for the console.
OK.
This value is the result of this operation that you can see here.
OK.
And here we assigned this value to our variable here.
OK.
Or I can actually add one value to my variable.
And then if I run on my project as you can see it's going to output this value to the console.
OK.
So now let me show you another way of actually adding one value to our variable.
OK.
Again I need to refer to the name of my variable number one.
And then I put the plus operator and the assignment operator OK.
And then I just put in the number one here and at the end of my statement I need to add the semi-colon.
OK.
So if I actually output the value of this variable to the console Now system that out that insulin and
then inside the prentices again I need to refer to the name of my variable and I need to actually add
the semi-colon at the end of my statement in order to end this statement here.
And if you run my project as you can see it's going to Outwood is going to output this value to the
console like a number two.
OK.
So here in this line of code we added one value to our rowdier and so for example if we wanted to add
free value to our free value free.
So for example if I wanted to add free value.
So for example.
So for example if I wanted to add free to my valuable Let's see what happens let's let's run our project
and see what happens.
So as you can see it's going to add free value to the value of our value.
OK.
11 plus free is 14.
OK.
For example if I wanted to actually subtract some values from the value of this not too variable.
I just need to type in here number two.
Okay.
And then I just need to put in minus and assignment operator here and here I need to actually put in
there value that want to subtract from the value of this variable.
Ok for example 5.
And then at the end of my statement I need to put in a semi-colon OK.
So I just need to type in here system that out that princeling.
And then inside Apprentice's I just need to refer to the name of my value.
And at the end of my statement I need to put in a semi-colon OK.
So if I do it on my project as you can see it's going to output this value to the console.
OK so 8 minus five is free.
OK.
As you can see here so as you can see here this statement here is the same as this statement.
OK.
Now one and then we put the assignment operator and then if you put the name of our variable plus number
one.
OK.
And again this statement here is the same as this statement.
And this one again is the same as this statement OK.
And this statement is the same as this statement.
And this statement is the same as this statements.
OK.
So this way of actually writing your statements is a lot of advice.
OK.
So you can actually assign values to your variables this way.
OK.
But are wanted to show you how you can actually assign values to your variables in this way.
So maybe in the future you may see in some other source codes the program may have actually used this
way of assigning values to the ballots in his or her Java programs.
OK this is just another way of assigning values to your valuables.
OK.
So another important point that I want to show you here is that for example if I want to declare another
variable here.
Ain't no free.
And then I assign a value to my value.
OK.
So here if you want to add value to my variable i just need to type in here now free plus.
And then the assignment operator.
And then I just need to put in a value here.
For example number four.
OK.
At the end of my statement I need to put in a semi-colon.
So if I actually want to output the value of this variable to the console I just need to type in your
system with out that insulin and then inside the prentices I need to refer to the name of my variable.
Now free.
And then at the end of my statement I need to add the semi-colon OK.