 Now, we're going to look at compiling out our own program. If you look at the screen, you can see that we've already got something built out. Go ahead and take a second and copy and paste that into Notepad++. Here's that pause. Hopefully, you've had some time and you've gotten that taken care of. It should look something like this. You can see suddenly that right now, I made promises. I said that Notepad++ was going to do syntax highlighting and it was going to make everything so easy. You lied to me, Mr. Guida. You lied to me. No, not really. Right now, because Notepad++ is a text editor, it thinks you're just giving it text. It doesn't know that this is Java. That's actually where this language menu item comes into play. Again, there are so many programming languages that each one has their own different kind of syntax. We have to say explicitly that we are using Java, J Java. Notice how as soon as we select it, suddenly it makes it nice and warm and comfortable. What happens if I want to compile this out? Right now, it is just syntactically Java and I have not saved this. One of the things I like to do is I like to save to my desktop. I like to go in and when I'm writing a piece of code for the first time, I like to write to my desktop or wherever I'm working. I like the desktop just because my desktop is pretty bare. It lets me work. And so, okay, it's very nice. So one of the things we have to do is whatever we name our public class. In our case, we named it, welcome. Public class, welcome. It needs to be named welcome.java. Whatever we have as that name is the class, that's what it needs to be named as. So we can hit save. So now all of a sudden, all right, I've got this working. How do I compile it? Well, right now, this doesn't do it. I have to actually add in or bring in another program. I have to bring in what's known as my command prompt. If you're a user of a Macintosh or a Linux machine, you're going to bring in your terminal. Now, I don't know off the time I have where it is on the Linux machine. It's very easy to find. It's in your applications. For you Macintosh users, you'll want to hit the little rocket icon. And then it'll be when you app launch, it'll be in your other section called terminal. For us Windows 7 users, we can just click on the start menu icon and type in something like CMD. And that'll bring it up for us. If you're a Windows 8 user, you'll see your little magnifying glass on your kind of screen. That's where you want to click, and that'll take you to your search. So I hit enter CMD. That brings me to my command prompt. Now if we take a look at this, this is giving me a look into my directory. So if we take a look for a second, this is what it looks like. I'm right here. This is my Windows Explorer machine. It's the GUI version of this. And so you can see I can mess around with it. But I said explicitly that I saved my welcome.drive file to my desktop. So how do I get to my desktop? Well, in this case I can go and double click on my desktop. All right. Yay. But that doesn't allow me to do that here. Now what I can do is I can use a keyboard command, a command prompt command called cd, cd change directory. Now by itself doesn't do terribly much. But if I add in a folder such as the desktop folder, which is inside of my user directory, I can go to it. And you notice when I hit enter, suddenly it's users aguita desktop. Now all right, what if I don't want to have this guy always around? Well, it's not a problem. For Windows machines, what we're able to use is we're actually able to use a command called dir, get my directory listing. If you are a Mac or Linux user, you are going to use ls. Windows machines don't have ls, but it does the exact same thing. It lists all of the contents of your current directory. So dir, you see that I have suddenly right here my welcome.java, and I'm going to go ahead and just zoom in a little bit for you guys, that way you don't have to full screen this on your own end. So you see that I have welcome.java. So now, there we are. What do I need to do? Again, I'm going to do another little keyboard command for us. This is just to clear out my screen. I've got a lot of stuff going on. CLS. I like it. It makes it a little easier on myself. So to take this code, right now, welcome.java, welcome.java is a source code file. It's text, it's syntax that we as humans can understand, but not as the programmer. So we have to actually do a little change. We have to convert it into machine language. And to do that, we use a command called javasc. Now, if you're familiar with the desktop, the command prompt, you've probably seen something like this before. You've probably done something like ipconfig, ipconfig is typically one of the things that tech support will ask you to do if your internet's not working. If I hit enter, you see that I can get, all of a sudden, just all of that information. I get a little bit about my ip address, so my ip4 address, my mac address, all that stuff. Well, now what I can do is I can go ahead and say, for my sake, instead of ipconfig, I'm going to use something called javasc. And so inside of javasc, what I want to do is I want to go ahead and say, what? What am I compiling? Well, if we just run javasc by itself, just run javasc and hit enter. You should get something like that. You should get a slew of text. If on the other hand, you get something like this, not a recognized file, make sure to take a look at setting up your environment variables in links. But javasc, javasc, as we can see, gives me the slew of these commands and I see javasc options, source files. So it allows for me suddenly to take my code and convert it into machine language. So what I'm going to go ahead and do is I'm going to say, javasc welcome.java. And if this works perfectly fine, you're going to notice I get no errors, which is nice. Now if you did get an error, take a look at what it was. Here's the source code, so compare and contrast it, see if there's anything you're missing. Now how do I run my code? Right now, I've just compiled it, which means if I take a DIR look again, I now have a welcome .class file. And just so we can take a look at that, that machine language I was just talking about, what that does is it gives me something like this, a bunch of ones and zeros that we as humans have no idea about. I mean, I understand the welcome.java part, I see the nine times two equals, that's stuff that I did right. But I don't understand what this does, it's for the computer. So now how do I compile out this code and run it? I've compiled it, javasc. What I want to do is I want to do java welcome. I don't want to do java welcome.class.java, if I do either of those, freaks out, if I do .class, freaks out, what it's looking for explicitly is for me to tell it the object that we've built. One thing, everything in Java is an object. So we've just designed our first object. Hello world, nine times two equals 18. Now I'm going to throw out just a little bit more before we take a little break in. Let's take a look at the code I've got here. I see system.out.print line. Print line is going to give me a new line. It's going to act as if I was typing out this code myself and I had hit enter. System.out.print, system.out.print on the other hand has no new line, it doesn't have that inner. And that's why all of a sudden I can see nine times two here. Now I'm going to change this. I'm going to change this from nine times two to times plus, plus, always change your comments as well. Plus, I'm going to change that. I'm going to compile it back up. Java C, welcome.java, java, welcome. You see we can make changes to our code now, saving it, compiling it, running it so we don't need our IDE. Now I am going to throw out a little pop quiz for you guys. What happens if I were to do this? What happens? And take a pause and run this in your code for a second. I'll wait. Okay, I'm back. I'm done waiting. Hopefully you paused me when you did this on your own. One of the things you will see is because of how programming works, nine plus two is going to equal 92. What's going on here is because Java doesn't understand how to add a string to a number. Well, it does. It has a de facto way of doing it. But if we think about the literal, how do I take a string? It could be cat or something and then plus nine to it. What are we really looking to do? So what Java automatically does is it says, screw the math, you know, you're clearly not doing math. I'm going to convert those numerical values into strings. And that's what we get. And so suddenly nine plus two equals 92.