 So what happens if I want to change my num? And when I mean change my num, what happens if I want to change its data type? Now you might notice I've changed it from an integer to a double and there's a reason for that I want to show this off, but say for example. I wanted to change my num back into an integer Well, unfortunately, I can't just say my num is now an integer because if we think about it I've actually if we use the analogy of I've built a house. I've already built the house I've already zoned out the land the acreage is mine, so I can't just change it, but I can move To another place I can move my value to another place So let's say for example right underneath it. I went in and I said something like int My new num Equals I'm gonna put it all the way out here my num Now if I try and run this if I do go ahead and actually take a second pause the video Write this in your Java and compile it see what happens All right, so you've taken a look at it just so if you didn't you just stared at me while I was compiling things Let's say for example that I've already written it out and I try and compile this so Compile it up. Let's take a look at you. Let's pull you back over here Java C Welcome that Java Again take a look at what happens when I attempt to compile this Mmm, we just got a new error message incompatible types possible lossy conversion from double to integer I don't like errors. What does that mean? all right, well My num only equals five, but what would happen if I made my num equal five point five and Then I tried to convert it into an integer Suddenly what's happening is Java saying hold on you might have Numbers on the right side of that decimal place and if you try and cast this To a lower level number something that doesn't have decimal places You might have what's known as a lossy conversion I might lose some of those decimal places that can be bad because you know as much as I like that I kind of want things to be very precise sometimes So how do I fix this? How do I? Explicitly do this Well, that's actually where it comes into something called Casting the data type inside here. I left this space But what I have to do is I have to include an extra command. I have to include inside of parentheses The word int the data type that I plan on converting into so if I come in here now and I throw in Int in front of my num Then if I try and compile this Notice how it didn't error at all now I don't have it printing out anything but notice how it did not have an error. Let's actually see what happens I've just proposed that scenario to you guys So what I want you to do is I want you to add in a print line my new number And I want you to go over to my num and make it 5.5 now again pause the video compile this up and see what happens All right, so you hopefully pause it and you actually took a look at what's going on But let's see this in action I Compile it and then when I run this code Suddenly that point five when I said I had an error earlier I have a lossy conversion type earlier what I did when I Casted it my double into an integer. I basically said I don't care about that lossy conversion do it anyway and Java being a very good to follow directions program said okay Boss and so suddenly the five point five became a five