How to Write Java Program in Eclipse Step by Step

This is a beginner tutorial and I demonstrate, how to create a “Hello World” Java Project in Eclipse IDE. I used Eclipse IDE here because it’s a free tool we can use many Java and other programming languages-based developments including Android.

Step 1: Download the Eclipse IDE and install it.

Step 2: Create a Java Project

Select File --> New --> Java Project





Step 3: Type Project Name as HelloWorld and press Finish (use the parameters as in below image)



This will be your first project structure.



Step 4: Create a Java Hello World file. Right-click the “srcfolder --> New --> Class




Step 5: Set the class name as HelloWorld and press Finish.



Now your file will come under the “src” folder.




Step 6: Open HelloWorld.java file and create the following code.


//Copyrighted geekdecoders.blogspot.com
public class HelloWorld{
 
    public static void main(String args[]){

        System.out.println("Hello World");

    }
}


Step 7: Run the Java Program




Here is your output

Comments

Post a Comment