OK, let's continue this lecture with conversions, so why we need conversion, because when you add
up numbers or multiply or you need a smaller data type, you convert it into another type.
There are two types of conversions.
Widening and narrowing, automatic or widening conversion is easy.
Imagine variables as boxes.
Byte is a small box short.
It's a bigger one.
You can easily put the content of a small box into a bigger box as we go along.
It's easy to see why we can convert upwards in case of load and double.
We use it to store along.
The other way is explicit conversion or narrowing while it's not too pleasant.
We have to put the content of a bigger box into a smaller one.
We can lose data here which can cause problems.
So as when we go downwards, we have to use the following form first the desired data type, then the
new variable name equals the desired data type in parentheses, then a value like thousand or three
hundred or two or another variable name.
We also call this casting.
Right, and I think it's easier to see how it works in practice.
So let's do some coding.