Really well and then I use a plus operator and then I refer to the name the name of your body.
But for example number here and that again I can use a plus operator in order to concatenate these values
to other values for example again I use double quotes and inside the double code.
I just use actually space here.
And then I can enter my text.
For example this is my variable and this is great.
This is great for programming.
So now if I actually press on the Enter key on my keyboard Let's see what happens.
OK.
Just press ENTER key.
So as you can see it automatically puts up plus operator and two double codes in order to help me continue
adding other values.
OK.
For example here inside these double quotes I can put another value for example other values.
OK.
And then at the end I just need to put a semicolon into my statement.
So now actually let's run our project and see what happens.
So as you can see it now it has output had these values to their console area.
OK.
So I think that's enough for concatenation.
OK.
Now I want to output the value of this and other number variable to the console.
OK.
So first let me point out that I don't want to execute these other statements here.
So I just need to actually comment out these lines of code.
OK.
As you can see here so now as you can see I want to output the value of this variable to the concert
and you can see that I didn't assign a value to my variable here.
So now let's just output the value of this and other number but as you can see here to the console.
OK.
So we need to type in a system that's out that princeling.
And that inside the apprentice's just referred to the name of that variable.
OK the number okay.
And then we need to put a semicolon at the end of our statement.
So as you can see here it's now showing us a nasty error.
So let's see what's this error.
As you can see here it says the local variable.
Another number may not have been initialized.
I talked more about local variables later in this section but for now just ignore it.
And as you can see here it's now telling us that this another number of about does not have a value.
OK we didn't assign a value to this variable when we created this variable.
So now if I for example assign a value numbers 10 to this variable.
Now as you can see the error is gone.
Now I can run my project.
So this is number 10.
OK this is the value of this and other numbers here.
So it's a very good programming practice that you assign a value to your valuables when you create them.
OK.
But let me point out another important point here.
For example if I actually assign a value value to my variable and now is showing us an error.
OK.
So if I hover over the error it's now recommending us that we should initialize the variable.
OK.
So if I click on this initialize Maribelle.
Now as you can see it automatically assigned a value to my body.
Now the error is gone.
And when I run my project the value of my variable is showing here.
OK.
Now I'm going to you about declaring variables in another way.
OK.
So first let me comment out these lines of code.
OK.
Because I don't want to execute them.
So first let me actually point out when you are creating several variables of the same type you can
declare all of them in the same statement by separating the variable names with commas.
OK so what do you mean by that.
First let me assure you that I will not declare three different variables here.
OK the first one would be it is data type is it.
As you can see here.
And the name of my variable is number one.
OK the second one will be in again and its name will be known to the first one with the end and the
it's name would be number three.
OK.
So as you can see here I've got three different variables but it's the same as you can see with the
same data.
OK.
Three different variables with three different names but these three variables have got the same data
type which is in here.
OK.
So now I want to show you how you can declare these variables in an other way.
OK.
So first let me actually comment about these three variables here.
As you can see here.
So now I want to show you another way to actually declare this for the variables the data type as you
can see here is it.
OK so now the name of the first variable is number one.
So now I'm typing here now what.
It's a comma.
The name of the second variable is number two.
Ok now I'm typing here not to.
OK.
After the comma.
Just type in two.
OK the name of this first actually the name of the first variable is now three.
So I just type here number three.
So as you can see here I declared these free variables in one statement here.
OK these are these are three different variables with the same.
Actually data type and also make sure that you put the semi-colon at the end of your statement here.
OK this is very important.
So now you may ask that can I actually assign values to these variables here.
Yes you can.
For example I can assign a value to this.
Now one variable here.
OK.
So first I need an assignment operator.
As I said before and that I need a value to actually assign that value to this variable so the value
would be.
For example number 50.
OK.
Now as you can see here I assigned the value of 50 on the right hand side of the operator to the left
hand side of the operator.
And now you may ask that.
Can I actually output the value of this variable to the console.
Yes you can.
You can actually just type in here a system that out that print line and inside the parenthesis you
just need to refer to the name of that specific value.
OK so now I want to read the value of this valuable here.
So I just need to refer to the name of that variable which is number 1.
OK.
And at the end I need to put the semicolon here.
OK.
So now if I run my project as you can see it's going to output the value of 50 to the console.
And here if I want to for example refer to the name of the valuable number two.
Let's see what happens system that out that Queensland land and inside the prentices.
I just need to refer to the name of this variable in order to read its value.
OK.
So if I just typed in here number two and at the end I just need to put a semicolon here at the end
of my statement.
So as you can see here it's going to show me an error again because I didn't assign a value to this
variable here.
OK.
So now if I actually assign a value for example number 20 to this variable.
The error is gone and I can run my project now.
And now I want to output the value of this number three valuable to the console.
OK so now let me show you how you can do that because you want to actually explain another important
point about assigning values to variables.
OK now I'm going to output the value of is now free variable to the cost.
OK.
So first I need to type in System system that out that print alone and inside Apprentice's.
I just need to refer to this now everywhere.
OK.
Now I'm free.
And then at the end of my statement I just say to put in our semicolon.
OK.
So now as you can see it's now showing me an error again because I didn't assign a value to this variable
when I created this variable.
OK.
So now I want to show you how you can actually assign a value in our variable after creation of that
variable.
So now as you can see I'm going to refer to the name of this variable not.
OK.
And then I just put in us an assignment operator.
And then I just assign a value to my variable for example number 50 55.
OK.
So as you can see the error is now gone.
OK.
So now if I run my project as you can see here it's going to Outwood this value of 35 to the concert.
OK so first let me actually comment out these two lines of code and again I just need to run my project
as you can see here.
It's going to outfalls the value of 35 to the concert.
This value is the value of this.
Now everybody about.