OK.
So now that I am referring to the name of my invaluable in order to get to read it's value what J I
am actually adding this value to the number of 40 here.
OK.
So the result would be 41.
OK.
I am assigning the value of this operation here to this rally event.
OK.
And in this slide I Outwood the value of this variable to the console.
OK.
So let's run our project now as you can see here.
It outputs the value 1 to the console.
This rally to the console.
And here it outputs of this value to the console.
OK which is the result of this operation.
As you can see it outputs the value of this variable to the console.
OK.
So the next example that I want to actually show you is about negative numbers in Java.
OK.
You can create negative numbers in Java for example if you want to create an integer variable here.
And so the data type of my variable is in it and then the name of my variable would be negative.
Number and then I assigned the value minus 10 to my variable here.
OK.
And here I just I can easily output the value of this value to the console system got out that Prince
land and that inside Apprentice's.
I just need to refer to the name of my variable here.
So negative.
And here again I use the other complex feature of the eclipse and now it's going to show me some recommendations.
And here I choose the name of my variable here.
OK the name of the variable that I created in the line 21.
OK.
And I just need to put a semi-colon up at the end of my statement here.
OK.
And as you can see.
So if I run my project now it outputs this value which is the value of this value to the console.
OK minus 10.
The next example that I want to show you here is about negative decimal numbers.
OK.
So first let me actually comment out this line of code here because I don't want to execute this line
of code.
And first I need to declare the data type of Y variable which is float.
OK.
And then I need to actually give my variable a name.
For example negative negative the small number or J.
And then I assign a negative the symbol number to my variable for example four point eight.
OK.
And then at the end of my Actually statement at the end of my variable declaration I need to put a semicolon.
OK.
So here as you can see it's now Scheunemann error.
OK so let's see what's this letter.
We need to hover our mouse pointer over the error area in order to see what's the error type mismatch
cannot convert from double to float.
So as I said earlier in this section all floating point lead rules are considered to be of the double
valuable time instead of load.
OK.
To specify a literal of load add the letter S to the literal.
OK.
So in order to make this little float we need to add the letter F at the end of our leader on here.
OK.
So as you can see here now the error is gone.
OK so now if you want to output the value of this variable to the console.
I just need to type in here system with a capital S..
OK this is really important system that's out.
Got princeling and the inside Apprentice's you just need to refer to the name of this variable negative
number.
So here I use the auto complete feature of the eclipse.
OK.
And now it's going to show me some recommendations.
So I choose my variable name here and at the end of your statements you need to put in a semicolon.
OK so if I run my project now as you can see it outputs the value of this valuable to the customer which
is number four point eight.
OK.
So the next example is about larger integer leaders.
OK.
So a larger integer literal can include an underscore character to make it more readable to humans.
OK.
The underscore character serves the same purpose as a comma in a large number make unique its value
more readable to humans.
OK.
So let's so let me give you an example about this concept.
OK.
So the data type of our variable is large.
OK.
And the name of my variable is of very large number as you can see here.
OK.
And then I assign a very large number to this variable.
For example this number OK.
And at the end of my statement I just put a semicolon OK.
And now as you can see it's a little hard to read this value here.
OK.
So we use the underscore character in order to make this value more apparent for humans.
OK.
So now if I use the others for character here as you can see and if I use another underscore character
here as you can see this value is now more readable.
OK.
And the Java compiler ignores these activists.
OK so you can use underscore characters in order to make your numbers more readable to humans.
OK so now I want to actually output the value of this variable to the console.
So here we just need to add typing system that out that princeling and then inside the apprentice's
just referred to the name of the variable.
OK.
And that at the end of your statement you just need to put in a semi-colon.
OK so the next example is about Boolean literals OK the boolean literal is true and false are the only
two values you can use when assigning a value to a boolean value type.
OK so now let me give you an example.
OK.
So the data type of our variable is boolean.
As you can see here and the name of my variable is programming is fun.
Programming is fun.
OK.
And then I assign a value to my variable.
For example true.
OK.
True and False are the only values you can assign to a boolean value of.
OK so now I want to output the value of this variable.
The console system that out that princeling and the inside apprentices just refer to the name of the
variable.
So here I use the two complex feature of the eclipse.
And then at the end of my statement I put a semi-colon.
OK.
And now let me comment out this line of code here.
And if I run my project now as you can see it outputs the value of is valuable to the console.
AJ So this is the literal truth.
OK.
So the next example is about character leader roles are expressed by a single character surrounded by
single quotation marks.
OK.
So now let me give you some real examples.
OK.
So the data type are valuable is cards but yet you can hardly chart or charged.
OK.
And then the name of are valuable for example is a.
OK.
And then I assign the letter A to my body.
So I just putting two single quotations here and then I assign the letter A to my value.
And at the end of your statement you need to put a semicolon.
OK.
So now another example is car for example hash OK.
And then I assign the hash symbol to my value.
OK.
Or I can actually create another variable and the name of my variable is 3.
And then I can assign the value three to my value.
OK.