Here we see a simple example, just like what we saw in the previous module. So the example is HelloWorld. This is the class public so it's visible to the runtime as opposed to being private to some use, a public class named HelloWorld. In order to have this class recognized by Java, it must be in a file called helloworld.java and case counts. According to the naming convention we'll talk about shortly. Classes start with an uppercase character. And if I have multiple words such as Hello World, and these are two separate words, when we put them together we preserve the words are separated by uppercase letters. And this must go in a file called HelloWorld.java. Must match exactly including the case. It doesn't matter that you're running let's say on a Microsoft operating system with NTFS, and they don't care about case. Java does. Mac OSX will, Unix operating systems will others will. And Java cares about case, even if you're running on a file system that maybe doesn't. So please be aware of that, everything in Java will be case sensitive. Now here is our main, there it is. And it has a very specific, what we call signature that it must match. It must be public so that it's visible to the Java runtime. It must be static and we'll study later on what that means. But basically what it means is I can do this if all I know is the HelloWorld class. I don't have to be able to create an instance, an object from that class. For something that is our entry point, it has to be static. If it weren't static, well, what would have created the thing that came before it? So an entry point here must be static. Void means it doesn't return anything, the name must be main. Now if I were to run this off the command line, I could provide arguments and parameters to this program. Those will be passed into us, as a string array. For those of you who might be familiar with programming languages like C where they also tell you how long the array is, we don't need to do that. One of the things about Java is we can simply ask the args array, how long are you? How many entries do you have? So all we really need is a String array. That's what the square brackets mean. Don't worry about memorizing this. We'll come back over this as we hit these things up formally later. Now, the function itself this main method, is delimited by these braces. Inside the braces here is a single statement, system out print line, and the string Hello World. So this is simply the means by which I get the ability to print to the standard out. The method is delimited by the braces, the class itself is delimited by braces and that is the entire content of this program. This is a complete Java program that will print Hello World, if we were to run it at the command line. Whenever you want to run code, you will probably want to have a main method that at least can exercise that code. Now I am going to launch eclipse. Accept my default workspace. Now that eclipse is running, I will close the welcome that I get from a freshly started workspace, and I will go create a new Java project. I'll give it a name. My project name will be Demos and I'm done. Eclipse is offering to put me into a perspective, a organization of tools for Java development. I've said yes, I will now right click on demos and indicate that I would like to create a new class. I'm going to call it HelloWorld. Now, by default, that would be created without a package. Which means it'd be created at some sort of root directory level. We want to organize and control how our things are placed in file systems. You'll notice the message up here, the use of the default package is discouraged. So I'm going to call it, based off of the domain name for learn quest. Com.learn Quest and now I'll put whatever I want. So I call it demos. I will tell eclipse that I would like to have a main method. I will click finish, it has created the package, it has created the file with the correct name, and it has brought me into an editor. I will remove this comment that was placed automatically by the blueprint, with the one line that we've discussed system.out. Notice how eclipse is helping me type. It knows maybe what I'm looking for. I want print line, and I will say, HelloWorld and this line has an error, you'll notice that. And the error is, we have not yet put the semicolon on the end. I have put the semicolon on the end. And this program is done. I will click up here to run it. And here is my result. And notice I don't like that because it's a HelloWorld without a space. Look how nicely I can just go up here, edit it, save it. Run it again, and there it is Hello World. So that is a quick run through eclipse, which is the environment we will be using for all of our work.