CodeToConcept
About

java

java Tutorials

Introduction
Java Fundamentals
Java Variables
Java Data Types
Java Type Casting
Java Operators
Java Input/Output
Control Statements
Java Class & Object
java Method
Java Constructor
Java this keyword
OOP Principles
Java super keyword
Coming Soon Topics

java Tutorials

Introduction
Java Fundamentals
Java Variables
Java Data Types
Java Type Casting
Java Operators
Java Input/Output
Control Statements
Java Class & Object
java Method
Java Constructor
Java this keyword
OOP Principles
Java super keyword
Coming Soon Topics

Sample Question

Think it through, then check the tutorial.

CodeToConcept

Quickly learn through simple, structured, and practical coding tutorials. Build your confidence from step zero to real-world experience.

© 2026 CodeToConcept. All rights reserved.

Quick Links

AboutTutorials

Tutorials

Java

Support

Privacy PolicyTerms of ServiceContact
GitHubTwitterYouTube

Java First Program

We will use IDE (Integrated Development Environment) to write and run our Java program. There are different IDEs available for Java development, but we will use Eclipse which is one of the most popular and widely used.

Download and install Eclipse IDE for Java Developers from the Eclipse official website.

Eclipse IDE

Or you can download for different operating system from the below link :

  • Eclipse IDE for Windows
Eclipse IDE Download Page

In the installer, select one:

  1. Eclipse IDE for Java Developers (most common)
  2. Eclipse for C/C++
  3. Eclipse for Web & JavaScript
  4. Eclipse Enterprise Java (Jakarta EE)

Congratulations! You have successfully installed Eclipse IDE for Java Developers. Now Launch it to start coding. You will see a welcome screen, just close it to open the main workspace.

Eclipse Welcome Screen

Create your first Java Project in Eclipse :

  1. Click on File (left top corner) → New → Java Project. if Java Project is not visible, click on Other and search for Java Project and select it and click next.
Create Java Project in Eclipse
  1. Now you will see the New Java Project dialog, enter the project name (e.g., JavaFirstProject) and click on Finish.
Java Project Name

3.Now Inside the project right-click on the "src" folder, click on "New" and select "Class" to create a Java class. provide class name (e.g., HelloWorld) and Package name (e.g., com.java.first.program) and click on Finish.

Create Java Class in Eclipse
  1. Now you will see a new Java class file with the name "HelloWorld.java" inside the src folder. Now replace the code in the HelloWorld.java file with the below code and save it (Ctrl + S).
public class HelloWorld {
    public static void main(String[] args) {
        System.out.println("Hello, World!");
    }
}

Note : The file name should be same as the class name and should have .java extension.

  1. Now to run the Java program, right-click on the HelloWorld.java file and select "Run As" → "Java Application".
Run Java Program in Eclipse

Great! You have successfully run your first Java program in Eclipse IDE. You will see the output "Hello, World!" in the Console tab at the bottom of the Eclipse window.

First Java Program Output

See you in next page....🙂

← Compilation & ExecutionJava Comments →
← Compilation & ExecutionJava Comments →