And another point that I want to actually explain about the variables is that you can actually declare
different variables with different names.
OK.
You can't declare different variables of it actually the same name.
For example if I just want to create another variable with the data type in it.
And again if I want to actually copy and paste this variable name OK for this variable.
For this new variable.
And then if you want to actually assign a value to this variable as you can see it's now showing us
an error.
Ok so if my heart can hover my mouse pointer over the error area here as you can see it says duplicate
local variable variable name.
So now it's complaining that we have actually duplicated this variable name here.
So we just need to change this second variable name and as you can see I changed this second variable
name to variable names.
Now the error is gone.
OK.
As I said before variables are nothing but reserved memory locations to store values are great and variables
are just actually placeholders for data in our program.
This means that when you create a variable in your program OK you reserve some space in memory based
on the data type of a variable.
The operating system allocates memory and decides what can be stored in the reserved memory.
OK so by assigning different data types to variables you can store integers decimals or characters in
those variables.
OK and there are two data types in Java.
OK the first one is primitive data types OK.
Which you are already familiar with like this.
Int data type this into data type is actually primitive data type.
OK.
And the second one is object or actually reference
data types.
For now just ignore this object or reference data types or later in the section.
I'll teach you more about these actual data types but for now we just want to focus on primitive data
types and I think that's enough for this tutorial.
And in the next year or Oriol I'm going to teach you more about primitive data types and how you can
use them in your job programs.
OK so thanks for watching and I'll see you in the next tutorial.