Skip to content

Introduction to Java – The Language That Powers the World

What is Java?

Java is a high-level, object-oriented, platform-independent programming language created by Sun Microsystems in 1995 (now owned by Oracle). It’s known for its slogan:

β€œWrite Once, Run Anywhere.”

This means the same Java code can run on any device that has the Java Virtual Machine (JVM).

πŸ› οΈ Why Learn Java?

  • πŸ”’ Widely used in enterprise software, Android apps, web apps, and IoT
  • 🌐 Cross-platform capability (Windows, Mac, Linux)
  • πŸ’Ό High demand in the job market
  • βš™οΈ Strong ecosystem (Spring, Hibernate, Maven, etc.)
  • πŸ’» Excellent for learning object-oriented programming

πŸ“₯ Step-by-Step: Setting Up Java on Your Machine

1. Download and Install JDK
2. Set Environment Variables (Windows)
  • Open System Properties > Environment Variables
  • Add:
    • JAVA_HOME β†’ your JDK path
    • Add %JAVA_HOME%\bin to the Path variable
java -version
javac -version

You should see the installed Java version printed.


4. Choose Your IDE
  • IntelliJ IDEA (recommended): fast, modern, and powerful
  • Eclipse: classic and widely used
  • VS Code: lightweight, with Java plugins

πŸ’‘ First Java Program: Hello World

public class HelloWorld {
    public static void main(String[] args) {
        System.out.println("Hello, world!");
    }
}

Compile

javac HelloWorld.java

Run

java HelloWorld

βœ… What You Learned

  • What Java is and why it’s powerful
  • How to install JDK
  • How to run your first Java program

Tags:

Leave a Reply

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