So first year plus four is 44 OK.
And in line 47 I decided to actually output the value of this second variable to the concert.
As you can see here.
OK.
This is the value of the second value.
OK.
So in light eight as you can see I decided to add value to my first variable.
So this is how I actually assigned a value to my first variable.
I decided to actually subtract 10 values from the value of my first variable and then I actually assigned
the result of this operation here to my first variable.
OK.
So as you can see here the value of the first variable is fretty for now.
OK.
Because of this because of this expression here the value of the first of is 44.
Okay.
And in this line of code I want to subtract 10 values from the value of my first variable.
OK.
In line forty eight or you want to subtract 10 values from the value of my first variable.
Ok so 54 minus 10 is 24.
OK.
And in line 49 I decided to out food the value of my first valuable to the console.
So as you can see here in the console this is the value of my first value 24.
OK.
So be sure to practice this skill that I actually teach you in these lessons.
OK.
So now I want to show you some other examples about actually assigning values to your valuables.
So first let me actually comment out these lines of code here because I don't because I don't want to
execute them.
OK.
So I just create a multi-line comment.
Again I want to create free variables here.
OK.
So the data type of my first variable is int and the name of my first variable is for example First
the number.
OK.
And then I don't assign any value to my variable here.
OK.
And I want to create another variable here.
So the data type of my variable here is in the name of my variable.
Is second number.
And then at the end of my statement I need to put in a semi-colon.
OK.
Again I want to create another variable so the data type of my variable is in it and the name of my
variable would be first numbers.
OK.
And I don't assign any value to my variable here.
OK so now.
So now you want to actually assign a value to my first number variable.
OK.
So I just need to refer to the name of my first number variable and then I can actually assign a value
to my variable.
For example number 50.
OK.
And then at the end of my statement I need to put in a semicolon OK.
So now I want to actually output the value of my variable to the console system that's out that creates.
And then inside Apprentice's I need to refer to the name of my valuable first number and at the end
of my statement I need to put in a semicolon.
So if I run my project now as you can see it's going to output this values to the consulate number 50.
OK so now I want to actually assign a value to my search number variable.
So again I need to refer to the name of my search engine number variable.
Ok I use the autocomplete feature of the eclipse in order to help me write my code faster.
OK.
Second number.
And then I assign a value to my valuable here.
OK.
So you want to actually assign the value of my first number variable to my second number value.
So here I just need to refer to the name of my first number of variables.
As you can see and here I need to put a semi-colon at the end of my statement and I want to actually
output the value of this variable to the console system that out that prints land and the inside Apprentice's
I need to refer to the name of my value.
But the second number.
OK.
So now if I run my project as you can see it's going to actually again outputs this value to the console
OK.
This is the value of my second number.
OK.
So I assigned the value of the first number to my second number and in line 59 I actually decided to
output this value to the consulate.
So now let me actually put the increment operator at the end of my first number of valuable plus plus.
OK.
And now you want to actually assign a value to my first number variable.
So I just need to refer to the name of my first number variable and then I can assign a value to my
first number variable.
So now you want to actually put the increment operator before the name of my variable.
So plus plus first number.
OK.
And then at the end of my statement I need to put in a semicolon.
So now I want to output the value of this variable to the console system that out that print line.
And then inside Apprentice's I just need to refer to the name of my variable for number and at the end
of my statement I need to put in a semi-colon in order to make the eclipse happy.
And as you can see the error is now gone.
OK.
So this is very important that you always end your statements with the semi-colon OK.
So now if I on my project it's going to show me some different results because of the difference between
our prefix and postfix operations.
OK so now let me actually run my project and see what happens.
OK.
So as you can see here it's going to output these free values to the console OK.
So the first one is the result of execution of this line of code as you can see here.
And the second value as you can see here this value is the result of execution of this line of code.
And at the first value as you can see here is the result of execution of this line of code here.
OK.
So when you use postfix operators on a variable in an expression.
So as you can see here are used these postfix operator on this first number variable here.
OK.
So when you use postfix operators on a variable in an expression.
So as you can see here this is an expression.
OK.
This line of code is an expression because it conveys a value.
OK.
As I told you before.
OK.
When you use postfix operators on a variable in an expression their variables value is evaluated in
the expression before it is incremented or decremented.
OK.
Inlight fifty eight I decided to actually add a value to my value.
But as you can see I actually referred to the name of my first number variable and at the end of my
variable name I put an increment operator here.
OK.
As you can see here this is the postfix operator.
I put the postfix operator here as you can see here.
OK this is the increment operator OK.
And then I assigned this value to the second number value.
So when you use postfix operators on a value bet in an expression the variables value is evaluated in
the expression before it is incremented or decremented.
OK.
So as you can see here this value here is the result of actually executing design of code here.
OK.
But this value is the same as the value of my first number.
When I actually assigned a value to my first number OK.
So here I actually put an increment operator here in order to add 1 value to this first number value.
But but because I used the postfix operator on the first number are valuable here.
OK this variable value is evaluated in the expression before it is incremented or decremented.
So here because I use the postfix operator on my first number variable.
OK.
It's not going to actually increment the value of this variable and then assign this value to my second
variable.
It's going to actually assign the value of this first number variable to my second number variable.
And then after that assignment it's going to actually increment the value of this first number variable
by 1.
OK because I use the postfix operator this happened.
So let me actually explain once again because I used the because I used the postfix operator on my first
number variable here.
OK the value of this first number of valuable will be assigned to second number variable and then it's
going to actually increment the value of this first number variable by 1.
Ok so now as you can see it's going to actually assign the value of this first number variable which
is 50 to my second number variable.
And then it's going to actually increment that value by 1.
OK.