Skip to main content
Java Basics
CHAPTER 01 Beginner

Introduction to Java

Updated: May 17, 2026
5 min read

# CHAPTER 1

Introduction to Java

1. Introduction

What if someone told you there's a programming language that runs on over 3 billion devices — from Android phones to banking systems, from Netflix's backend to NASA's Mars Rover software? That language is Java. Created in 1995, Java is one of the most enduring, versatile, and in-demand programming languages on the planet. In this chapter, we'll explore what Java is, why it was created, and why learning it in 2025 is still one of the smartest career moves you can make.

2. Learning Objectives

By the end of this chapter, you will be able to:
  • Explain what Java is and its core philosophy.
  • Describe the history and evolution of Java.
  • List the key features that make Java unique.
  • Differentiate between JVM, JRE, and JDK.
  • Identify real-world applications built with Java.

3. What is Java?

Java is a high-level, class-based, object-oriented programming language designed to have as few implementation dependencies as possible. It follows the famous principle:

> "Write Once, Run Anywhere" (WORA)

This means Java code, once compiled, can run on any device that has a Java Virtual Machine (JVM) — whether it's Windows, macOS, Linux, or Android.

Real-World Analogy: Think of Java like a universal power adapter. You write your code once (the adapter), and it works in every country (every operating system) without modification.

4. History of Java

Java was created by James Gosling and his team at Sun Microsystems in 1995. It was originally called "Oak" (named after an oak tree outside Gosling's office) and later renamed to Java — inspired by Java coffee from Indonesia.
YearMilestone
1991Project "Green" started at Sun Microsystems
1995Java 1.0 officially released
2006Java becomes open-source
2010Oracle acquires Sun Microsystems
2014Java 8 released (Lambdas, Streams)
2017Java 9 (Modules) — 6-month release cycle begins
2021Java 17 LTS released
2023Java 21 LTS released

5. Key Features of Java

Java's popularity stems from its powerful set of features:
  1. 1. Platform Independent: Java code compiles to bytecode, which runs on any JVM.
  1. 2. Object-Oriented: Everything in Java revolves around objects and classes.
  1. 3. Simple: Java removed complex features like pointers and multiple inheritance of classes (from C++).
  1. 4. Secure: Java has no explicit pointers, runs inside a virtual machine sandbox, and includes a built-in security manager.
  1. 5. Robust: Strong memory management, automatic garbage collection, and exception handling.
  1. 6. Multithreaded: Java natively supports concurrent execution of two or more threads.
  1. 7. High Performance: Just-In-Time (JIT) compilation makes Java fast despite being interpreted.
  1. 8. Distributed: Java was designed for the distributed environment of the internet with built-in networking support.

6. Understanding JVM, JRE, and JDK

This is the #1 interview question for Java beginners:

12345678910111213141516171819
+-----------------------------------------------+
|                    JDK                        |
|  (Java Development Kit)                       |
|                                               |
|   +---------------------------------------+   |
|   |              JRE                      |   |
|   |  (Java Runtime Environment)           |   |
|   |                                       |   |
|   |   +-------------------------------+   |   |
|   |   |           JVM                 |   |   |
|   |   |  (Java Virtual Machine)       |   |   |
|   |   |  - Executes bytecode          |   |   |
|   |   +-------------------------------+   |   |
|   |                                       |   |
|   |   + Class Libraries                   |   |
|   +---------------------------------------+   |
|                                               |
|   + Development Tools (javac, jar, etc.)      |
+-----------------------------------------------+
  • JVM (Java Virtual Machine): The engine that actually runs your Java bytecode. It's what makes Java platform-independent.
  • JRE (Java Runtime Environment): JVM + the core libraries needed to run Java programs. If you only want to *run* Java apps, you need the JRE.
  • JDK (Java Development Kit): JRE + development tools like the compiler (javac). If you want to *write* Java code, you need the JDK.
  • Enterprise Dominance: The majority of Fortune 500 companies use Java for backend systems.
  • Android Development: Android's native development used Java for over a decade.
  • Job Market: Java consistently ranks in the top 3 most in-demand programming languages globally.
  • Massive Ecosystem: Frameworks like Spring Boot, Hibernate, and Apache Kafka power modern microservices.
  • Community: Millions of developers, thousands of libraries, and decades of documentation.

8. Real-World Applications of Java

ApplicationDescription
Android AppsWhatsApp, Spotify, and Twitter were built with Java
Banking SystemsMost ATM software runs on Java
E-commerceAmazon's backend uses Java extensively
Big DataApache Hadoop, Spark, and Kafka are written in Java
Scientific ComputingNASA uses Java for mission-critical applications
Enterprise SoftwareSAP, Oracle ERP systems

9. Mini Project: Welcome Message Application

Let's write our very first Java program conceptually (we'll set up the environment in Chapter 2):
java
1234567
public class Welcome {
    public static void main(String[] args) {
        System.out.println("Welcome to the World of Java!");
        System.out.println("Java powers over 3 billion devices worldwide.");
        System.out.println("Let's begin our journey!");
    }
}

Expected Output:

123
Welcome to the World of Java!
Java powers over 3 billion devices worldwide.
Let's begin our journey!

10. Common Mistakes

  • Confusing Java with JavaScript: Despite the similar names, Java and JavaScript are completely different languages. Java is a compiled, statically-typed language for backend/Android. JavaScript is an interpreted, dynamically-typed language for web browsers.
  • Thinking Java is outdated: Java evolves every 6 months with modern features like records, sealed classes, and pattern matching.

11. Best Practices

  • Start with the JDK, not just the JRE: As a developer, always install the full JDK.
  • Use the latest LTS version: Java 17 or Java 21 LTS are recommended for production.

12. Exercises

  1. 1. List five real-world applications that use Java.
  1. 2. Explain the difference between JVM, JRE, and JDK in your own words.
  1. 3. Why is Java called "platform-independent"?
  1. 4. Who created Java, and what was it originally named?

13. MCQ Quiz with Answers

Question 1

Who created the Java programming language?

Question 2

What does JVM stand for?

Question 3

What is the "Write Once, Run Anywhere" principle?

Question 4

Which of the following is NOT a feature of Java?

Question 5

What was Java originally called?

Question 6

What do you need to install to DEVELOP Java applications?

Question 7

Java is primarily what type of programming language?

Question 8

Which company currently owns and maintains Java?

Question 9

Java bytecode is executed by which component?

Question 10

Which of these is a real-world Java application?

14. Interview Questions

  • Q: What is the difference between JDK, JRE, and JVM?
  • Q: Why is Java considered platform-independent?
  • Q: Is Java a compiled or interpreted language? (Trick question — it's both!)
  • Q: Name three features that make Java secure.
  • Q: Why do enterprises prefer Java over other languages?

15. FAQs

Q: Is Java still worth learning in 2025? A: Absolutely. Java remains one of the top 3 most demanded languages in the job market, especially for backend, enterprise, Android, and Big Data roles.

Q: Is Java hard to learn? A: Java has a moderate learning curve. Its strict syntax enforces good habits, making it an excellent first language for computer science students.

16. Summary

Java is a high-level, object-oriented, platform-independent language created by James Gosling in 1995. Its "Write Once, Run Anywhere" philosophy, powered by the JVM, makes it one of the most versatile languages ever created. The JDK is your toolkit for writing Java, the JRE runs it, and the JVM is the engine underneath. With billions of devices running Java and a massive job market, learning Java is a powerful investment in your career.

17. Next Chapter Recommendation

Now that you understand *what* Java is and *why* it matters, it's time to get your hands dirty. In Chapter 2: Installing Java and Setting Up Environment, we will install the JDK, configure environment variables, set up an IDE (IntelliJ IDEA or Eclipse), and write your first program from scratch.

Finish this Chapter

Save your progress on your learning path and prepare for coding interview challenges.

Discussion

Join the discussion

Log in or create a free account to participate.

Sort: ·