Learn Java Basics (Day 1) – Install JDK & Run Your First Program

Learn Java Basics (Day 1) - Install JDK and Run Your First Program

Welcome to Day 1 of our 100 Days of Java course. If you’re brand new to coding, you’re in the right place. We’ll start from zero and gradually move toward advanced Java programming.

In this lesson, you’ll learn:

  • What Java is
  • Where Java is used
  • How to install the JDK
  • How to set up Eclipse IDE
  • How to run your very first Java program

This guide is part of our Programming Languages category where you’ll also find tutorials on Python, web development, and more.

What is Java?

Java is a programming language – essentially a way for humans to talk to computers. You write instructions, and the computer follows them step by step.

Think of it like talking to J.A.R.V.I.S. in Iron Man: you give the command, and the system executes it.

Where is Java Used?

Java powers some of the biggest systems and apps around:

  • ATMs: For secure banking transactions
  • Android apps: Many Android apps are written in Java
  • Netflix: Streams content to millions using Java’s scalability
  • Minecraft: The entire game is built on Java

So when you learn Java basics, you’re learning skills that can be applied almost anywhere.

Step 1: Install the JDK

JDK = Java Development Kit, the tool that lets you write and run Java programs.

  1. Google: Download JDK 21 Oracle.
  2. Click the first result from Oracle.
  3. Select your OS (Windows, Mac, Linux).
    • Windows → .exe file
    • Mac → .dmg file
  4. Install with Next → Next → Finish.

Step 2: Install Eclipse IDE

Eclipse is your IDE (Integrated Development Environment) – basically your workshop for Java code.

  1. Google: Download Eclipse IDE.
  2. Visit the official site eclipse.org.
  3. Download the installer.
  4. Choose Eclipse IDE for Java Developers → Install.
  5. Launch Eclipse and set up your workspace folder.

Step 3: Verify Setup

Option 1: Terminal / Command Prompt

Type:

java -version

If you see a version number, JDK is working fine.

Option 2: From Eclipse IDE

  1. Open Eclipse → File → New → Java Project → name it TestProject.
  2. Inside src, right-click → New → Class → name it Test.
  3. Tick public static void main checkbox.
  4. Type this code:
public class Test {
    public static void main(String[] args) {
        System.out.println("Hello, Java!");
    }
}

Example Output

When you click the green play button, the output should be:

Hello, Java!

Congrats! you just wrote and ran your first Java program.

What’s Next?

This was Day 1: Learn Java Basics. In Day 2, we’ll explore Java variables and data types.

Meanwhile, you might also like:

Stick around, by the end of this course, you’ll master Java step by step.

Leave a Comment

Your email address will not be published. Required fields are marked *