The bullion is the last variable type that we need to look at, and it's very important.
So far, I learned to work with types into whole numbers, long, large, whole numbers, double decimals,
car four characters and string four text, the last type to learn about is the Boolean.
And in this lesson, you're going to learn to store boolean values.
We're going to start this section off by creating a new job, a project, so first create a new project
named Section three.
And inside the project, create a new file named Booleans Java and make sure the booleans class has
the main method.
The bullying type can only store two values, true or false, and the computer can use these true or
false values to make decisions and control the way your code runs.
Now, storing a boolean value is really simple.
You need to include three things, the variable type boolean such that the variable I'm going to call
bool one can only store boolean values and the value itself, which can only be true or false.
So instead of our case, we're going to make two billion variables, bullion bill one, one will store.
True.
Boolean Buhle to.
And the other is going to be fort's.
Now, I'm going to print to both values, but before I do, I want to give credit to Vardell and DeMain
from the description they shared a Vrsaljko shortcut for printing a line that I didn't know existed.
And we're going to use it.
And if you're not on the Dischord shot yet, you know, I encourage you to join.
You never know what you'll find in everyone's welcome.
We're all here to support each other.
In any case, we're going to racist's out and autocomplete, the print line comment, and that's just
beautiful, will print one as well as Boulle to.
All that's left is the runner code.
And that's really at each variable store is a boolean value, the first one stores the value true.
And the second one store is a boolean value a false.
In this lesson, you learn to store boolean values, and this covers the six main variable types, you
learn to store values of type int long double string car and boolean.
Now, you might be wondering why boolean values are useful.
Well, the way you're sorting them now is pretty useless and the screaming cat is not happy with the
way you're storing booleans, it doesn't approve.
Boolean values are only useful if in the form of a comparison.
And I'll show you some examples pretty soon.