‫So, yes, now get ready, because we are ready to write our first Java program.
‫So let launch Eclipse from the desktop shortcut.
‫Or your favorite Java development editor, and then choose a path for the workspace, I'll choose the
‫default path.
‫And sometimes you have to wait while Eclipse is being opened.
‫Hello, world will be our first program.
‫Now, of course, it's the tradition in the programming world to create a small program which writes
‫Hello World as the phrase to the console.
‫So in order to create a Java project.
‫Please choose the file menu and knew and then choose Java Project.
‫And then enter the project, name my first Java project.
‫All right, so you can use the default location or select the other location.
‫If you have multiple versions of Java runtime environment, you can always choose the jury that your
‫project is targeting.
‫And by default, the newest jury will be selected, so we choose the first option.
‫There's no need to change any of the other options.
‫And then click next on the screen.
‫And in fact, uncheck create module info, java file.
‫And then click the finish button.
‫And yeah, our new project was created in the Project Explorer of You.
‫So after that from the source folder, as I see on the project, explorer Payne on the left side of
‫the eclipse, eite just right click on it to show the contextual menu and choose the menu item, new
‫and class.
‫So now in this green enter hello world as a package name.
‫So package can be thought of as a folder and the package name starts with the lowercase letters.
‫So let's give Hello World as our name for the new class and also check the box.
‫Public static void Main And what that does is it lets eclipse clips, create a main method and then
‫we can click the finish button.
‫So now you see the hell a world class with package in the project explorer of you.
‫And also, you'll see a comment line on the code area to do auto generated Method's Stubbe.
‫Told you the language, so this is the eclipse code template that is automatically created.
‫Now, if we were of course, if we don't like this template, we can change the templates via the window
‫preferences, Java code style and code templates.
‫Select Code and Method Body and then just press edit to edit the template.
‫And then remove the to do comet.
‫Impress a plain clothes.
‫And let's see what we get.
‫So let's change the code of the hell, a world that Java file to the following code.
‫System, dot out, dot print.
‫Len.
‫Inside double quotes, hello, world.
‫And what this method does is it prints the content inside the double quote into the console and inserts
‫a new line after.
‫Now, in Java, it is necessary to add a semicolon at the end of the statement.
‫And that's all.
‫To execute the job.
‫Hello, World Program, right, click on your program file and choose run as Java application.
‫And if everything's correct, you're going to see hello, world in the console window, just like that.
‫Congratulations, we did our first Java program.