So I need to actually write another line of code in order to put the value of this variable.
After the decremented.
OK.
So in this line of code we decremented the value of this variable by one.
OK.
So I need to type in here system that out that print land and then inside Apprentice's it refers to
the name of my variable.
And then at the end of my statement I need to put in a semicolon.
OK.
So now if I run my project as you can see it's going to output this value to the consulate.
The value of my value is now subtracted by 1.
OK.
So that sets up for actually incrementing and decrementing operator.
So these increment and decrement operators can be placed before or after a variable name.
OK.
So now let me show you some examples.
When we actually place these operators before the variable name.
OK.
So for example I want to create another variable here ain't number one and then I assign a value to
my variable here.
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 to the console system out of that princeling and then inside
the practices.
I just need to refer to the name of my variable and at the end of my statement I need to put in a semi-colon.
OK.
So now if I run my project as you can see it's going to output this value to the console.
OK.
So now I want to use this increment or decrement operator before the variable name.
So now I put the increment operator.
And after that I referred to the name of my valuable number one.
OK.
And then at the end of my statement I need to put in a semi-colon.
So now I want to output the value of this valuable to the console.
Sister out of print land and then inside the parenthesis I need to refer to the name of my variable
non-fun and at the end of my statement I need to put a semicolon.
OK.
So now if I write on my project let's see what happens.
So as you can see again it increments the value of this variable by 1.
OK.
So this is the code for actually incrementing the value of this variable by 1.
OK.
We put the increments.
Operator we put the increment operator before the variable name.
OK.
And if you want to actually decrement the value of this variable by one.
So let me comment out these lines of code here.
And now I want to decrement the value of this variable by 1.
OK.
So I put the decrement operator before the value.
OK.
So as you can see I need to put a semi-colon at the end of my statement.
So now I want to output the value of this valuable to the concert system that's out that printer land.
And then inside the prentices I need to refer to the name of my variable and at the end of my statement
I need to put in a semicolon.
So now if I run my project as you can see it decrements this value by 1.
OK.
Decremented the value of this variable which is number 30 by 1.
OK.
So this is our value.
So what's the difference between actually putting these operators after or before the variable name.
In simple expressions such as these expressions as you can see it doesn't make any difference OK.
But in larger expressions it's going to be it's going to actually make a huge difference.
OK.
So now let me show you some real examples in order to make this concept more clear for you.
OK.
So increment and decrement operators are called prefix operators.
If listed before the variable name and postfix operators if listed after a value of a name.
OK.
So as you can see here in this example as you can see this increment operator is called prefix operator
and this decrement operator here is called prefix operator.
And in this example for example this increment operator is called postfix operator and these decrement
operator is called postfix.
OPERATOR OK.
So now let me actually show you some real examples.
OK.
So first I'm going to actually create some variables here.
So are the Data Type of my first Raddy is it.
And the name of my first variable is for example first value.
OK.
Okay.
And then I assign no value to my valuable here.
OK.
And then again the Data Type of my variable is in the name of my variable is second variable OK.
And again I want to create another variable data type of data type of my valuable is it.
And the name of my is for value it.
OK.
And then I assign no value to my variable here.
OK so now I want to actually give my first value a bad value.
So I just need to refer to the name of my first variable and then I assign a value to my variable for
example number 30.
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 cancer OK.
And then inside the prentices I need to refer to the name of my variable and then at the end of my statement
I need to put in a semicolon.
OK.
So now if I write on my project as you can see it's going output the value of this first variable to
the console OK.
So now I'm going to actually assign a value to my second variable.
OK.
So I just need to refer to the name of my second variable and then I want to assign the value of this
first variable to my second variable.
So now I want to actually assign a value to my second variable here.
OK.
So I want to assign the value of this first valuable ok to my second variable.
So in order to assign the value of my first Avari Abella to my second variable i just need to refer
to the name of my first variable.
OK.
In order to read it's value OK.
And at the end of my statement I just need to put a semicolon OK.
So now if I want to actually output the value of the second variable to the console I just need to actually
type in a system that's out that insulin.
And then inside Apprentice's I just need to refer to the name of my second variable.
And at the end of my statement I need to put in a semicolon OK.
So now if I actually run my project as I can see again it's going to output this this number 40 to the
console.
OK.
So this value is the value of the first value of it.
OK.
And we assigned the value of the first variable to my second variable.
Okay.
And in line 47 We decided to output the value of the second variable to the OK.
As you can see here.
So now I want to actually assign a value to my first variable OK.
So again I just need to refer to the name of my first variable.
As you can see here and then again are you want to assign the value of the first variable.
As you can see here the value of the first variable is 40.
OK.
To my first value.
OK.
So I just need to refer to the name of my first variable in order to read its value.
Okay.
And then at the end of my statement I need to put a semi-colon OK.
So now I want to actually output the value of this first variable to the console.
So just type in here a system that out that Prensa learn and then inside Apprentice's.
I just need to refer to the name of my first variable and then at the end of my statement I just need
to put a semi-colon OK.
So now if I run my project as you can see again it's going to output this value.
This number for the concert.
Ok this value is the value of the first variable as we assign a value to this variable in line 44.
OK.
We assigned a value to this first variable in line 44 and in line 45 we decided to output the value
of this first variable to the console.
So as you can see here this value is the result of execution of this line of code here.
We decided to output the value of this first variable to the console and in line 46 I actually assigned
a value to my second value and I assigned the value of the first variable to my second variable and
in line 47 I decided to output the value of the second variable to the console.
So as you can see here a decent value here this number 40 is the result of execution of this line of
code here.
Okay.
And line 48 I decided to actually assign a value to my first variable.