Register Login

Basic Java Program using Eclipse IDE

Updated May 18, 2018

In this tutorial, we will learn to write a simple basic JAVA program using IDE Eclipse

1) In the Eclipse IDE create a new project by

File -> New -> Project

2) After creating a new project give a name to your project and click finish.

3) A new project will be created in package explorer

4) Now create a new class in the source file of your project.

5) Give a name to the class and also to the package (packages are group of classes which is used to prevent naming conflict in java)

Basic JAVA Program

Below is a simple basic Java program

package PackageName; //Group of Classes//

public class ClassName {

public static void main (String [] args) { //method will take an array of string as parameter//

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

}

}

1) Now please save your the program

File -> Save

2) After saving the run or compile the program by clicking the green button indicated in the image below:

3) Once you run the program you will see an output at the bottom

Read Next Running a JAVA Program from Command Prompt


×