 So now we're going to look at some of the different data types that we can have inside of our Java programming, and very basic primitive data types. Primitive meaning that they're very small, they don't take up too much space in our memory. So the basic one, the one that you'll know, you'll learn to love for the rest of your life is known as the integer. So the integer pretty much is all whole numbers from negative 2 billion, 0.1, to positive 2 billion, 0.1, and some change. But what happens is that gets stored in a 32-bit binary string. There's a lot of numbers that I can store in there, and that's exactly what I get if I do 2 to the 32nd power. So we can continue on. We've got things like Booleans. Booleans are true or false statements. They only really handle one bit. We keep on going. We've got things like char data types which allow us to store single characters, text. Then we get into all these weird, you know, if you look at them, then we get double, float, byte, sort, log. Why do we have so many number variable types? Well, it's because numbers kind of matter. We have big numbers, small numbers, and so we design them out such that we have enough for them. Again, why is this important? Well, let's take, for example, hopefully you might know someone who is a long time sufferer of World of Warcraft. And if you're not, well, you might, it's still a good real life application. And if you think about it, where are you? There you are. We take a look at this paragraph right here. Additionally, bosses have to run into issues where their maximum health has grown too high. World of Warcraft has literally designed their bosses to be too powerful. Why? Because we take a look right there. While stores health, the health variable in their video game has a signed 32-bit integer. Again, that only has a maximum cap of 2.1 billion numbers. And then we get into this. The heroic only boss of the Throne of Thunder. He starts out at roughly 1.1 billion health. And so throughout the fight, if the players screw up, they make mistakes. And they just, you know, they're not where they need to be. They're not killing the whelps, you know, for anyone who played during Onixia. What can happen is it can overflow. What's an overflow mean? Well, an overflow simply is if you think about your old timey odominers. If when you got to the very top, the biggest number you could, you roll back to zero. Well, again, let's think about Ra Den for a second. If Ra Den, if you screw up, you're not doing your job as a healer or DPS, and you're not throwing the dots on there. I know. I have really missed World of Warcraft. If you're not doing your job, suddenly Ra Den's going to go into an overflow and suddenly he dies. When you win and you get money or loot, great, you know, you get your purples, you get your epics. But as a program, that's not exactly, you know, what you want. You don't want your program to crash on you. So you have to plan ahead. You have to look into those things. And that's actually what this latest expansion pack of World of Warcraft did. Is it decided, oh, we kind of need to take a step back. We need to fix this. And so they shrunk the numbers down again instead of trying to, you know, expand them. That's where that came in. That's actually the big thing, not the content. Nobody cares about content. So what do we do with those data types? Well, now we get into assigning a variable. So if you've taken algebra, hopefully, you understand that we have basically this thing that floats in space, or we'll do this so you guys get the left to right association now. So we have something that floats in space. Well, like I just said, we had something that we, I called the left to right association. The left side of that equal sign, that assignment operator, that acts as the where. Where in memory should this go? And how much should be allocated to it? So say, for example, an integer. If I say on the left hand side int length, what I've explicitly done is said, give me a memory address. I don't care what one. Give me a memory address, and I'm going to call it length. And I'm going to store at least 32 bits because I'm using an integer. So I need at least 32 bits of space. Think about this in the real life application. You're making an address. You're making a neighborhood association or something. Well, guess what? I need this type of house. This type of house is 32 bits of square feet. So I need at least this many acres to have this house on there. Now again, we're talking computer, and the computer is going to be like, okay, homeowner association and the government will probably say, no, you can't have that big of a house. But you know what? Computer's a computer. It doesn't care. Now on the right side, the right side of this is the evaluation side. It's the expression side. If the left side is the where, the right side is the what. So if we take a look at that last one, int area equals 2 times width, length, plus, width, length, plus, length, width, height, plus, length, height. What we're looking at is we're taking the evaluation. What are those variables? What is width? Well, we've already established that this is a memory address. So go to that memory address. Get the value at that memory address. This 2. Go to the memory address of length. Get that variable width, same thing, height, same thing, length, same thing, height, same thing. We continue to make those things up. So the one thing to keep in the back of your head is, again, it has to be left to right association. I can't say 7 equals length. I have to say length equals 7 because the memory address has to be on the left side in Java. Now one thing that I want to throw out for you guys. Well, unfortunately, this is already taken care of, but integer division. I want to at least state, give me a moment. This is what happens when you don't prepare. Anyways, okay, I don't know. All right, we're going to get to it really fast, so skip ahead. Just like hit the arrow key for a few times because there. So int i equals 4, int j equals 8. i divided by j equals 0. Why? Why? That should be 0.5, especially because I just showed you what's going on is we have something known as integer division. I said earlier that integers are whole numbers, meaning they don't have decimal places. So when you do something like division, they don't hold division symbols. So how do we fix that? Again, to do that, what we want to do is we change that. We would change them from being int i to double i and int j to double j. And then all of a sudden when we do i divided by j, it'll be 0.5. So the last little bit we'll get to in this lecture is what happens if I want to get my user's input. Say for example, instead of just dealing with numbers and typing them out, I want to actually state get an input from a user. Well, the first thing I need to do on the first line of code, excuse me, the first line of code is I need to say import java.util.scanner. Now what that's going to do is that's going to create this input stream for my user, for me and my user, my computer program and my user. Inside of my main method, wherever I'm using this, I want to go scanner, scanner equal new scanner. I know that sounds like a weird thing to do, especially since we haven't talked about objects just yet, but what this builds is now my user input. Now before you immediately start using that user input, you should probably use some form of a prompt. Tell the user what to type in, otherwise they don't know. So that's where we get something like enter a number. Telling the user, please, enter a number and then you go in and then you can use something like scanner.nextline. Now scanner.nextline, what that does is that takes whatever the user typed in and as soon as they hit enter, it allows me to use that as a string. So if you're so inclined, take a look at the making your first video, making your first program, the hello world that we did in the last video. And see if you can't make that say hello your name.