Skip to content

You are viewing a free preview of this lesson.

Subscribe to unlock all 10 lessons in this course and every other course on LearningBro.

What is Java

What is Java

Java is one of the world's most popular programming languages, powering everything from enterprise back-end systems and Android applications to big-data pipelines and embedded devices. Created with the philosophy "Write Once, Run Anywhere", Java compiles to bytecode that runs on any platform with a Java Virtual Machine (JVM).


A Brief History

  • 1991 — James Gosling and his team at Sun Microsystems begin the "Green Project", originally targeting interactive television
  • 1995 — Java 1.0 is officially released; applets run inside Netscape Navigator
  • 1998 — Java 2 (J2SE 1.2) introduces the Collections Framework and the Swing GUI toolkit
  • 2004 — Java 5 adds generics, annotations, enums, and the enhanced for-each loop
  • 2006 — Sun open-sources Java under the GPL licence (OpenJDK)
  • 2010 — Oracle acquires Sun Microsystems and stewardship of Java
  • 2014 — Java 8 introduces lambdas, the Stream API, and the java.time package
  • 2017 — Java moves to a six-month release cadence starting with Java 9
  • 2021 — Java 17 LTS brings sealed classes, pattern matching for instanceof, and records
  • 2023 — Java 21 LTS introduces virtual threads (Project Loom), record patterns, and sequenced collections
  • Today — Java remains a top-3 language on every major index (TIOBE, Stack Overflow, GitHub)

Why Learn Java?

1. Platform Independence

Java source code is compiled into bytecode (.class files), which runs on the JVM. Because JVM implementations exist for Windows, macOS, Linux, and more, the same compiled program works everywhere.

Source (.java)  →  javac  →  Bytecode (.class)  →  JVM  →  Native execution

2. Massive Ecosystem

  • Frameworks — Spring, Jakarta EE, Micronaut, Quarkus
  • Build tools — Maven, Gradle
  • Testing — JUnit, Mockito, TestContainers
  • IDEs — IntelliJ IDEA, Eclipse, VS Code with Java extensions

3. Strong Typing and Safety

Java's static type system catches errors at compile time. Combined with automatic memory management (garbage collection), it dramatically reduces common bugs like null-pointer dereferences, buffer overflows, and memory leaks.

4. Career Demand

Java is one of the most in-demand languages in enterprise software, financial services, health-care, and government.


Java Editions

Edition Full Name Purpose
Java SE Standard Edition Core language, libraries, and the JVM
Jakarta EE Jakarta Enterprise Edition (formerly Java EE) Enterprise APIs — servlets, JPA, CDI, messaging
Java ME Micro Edition Embedded and mobile devices

Tip: As a beginner, you will work entirely with Java SE. Jakarta EE builds on top of SE for server-side applications.


The Java Virtual Machine (JVM)

The JVM is the runtime engine that executes Java bytecode. Key responsibilities:

Responsibility Description
Class loading Finds and loads .class files
Bytecode verification Ensures code is safe before execution
JIT compilation Translates hot bytecode to native machine code at runtime for speed
Garbage collection Automatically frees unused memory
Security manager Enforces sandboxing policies

Multiple languages target the JVM — Kotlin, Scala, Groovy, and Clojure all compile to bytecode and can interoperate with Java libraries.


How Java Compares

Feature Java Python C# JavaScript
Typing Static Dynamic Static Dynamic
Compiled / Interpreted Compiled to bytecode, JIT Interpreted Compiled to IL, JIT Interpreted / JIT
Memory management Garbage collected Garbage collected Garbage collected Garbage collected
Primary use case Enterprise, Android, big data Data science, scripting .NET enterprise, games Web front-end and back-end
Performance High Moderate High Moderate–High
Platform independence JVM (cross-platform) Interpreter (cross-platform) .NET runtime Browser / Node.js

Key Terminology

Term Meaning
JDK Java Development Kit — compiler, tools, and the JRE
JRE Java Runtime Environment — JVM + standard libraries
JVM Java Virtual Machine — executes bytecode
bytecode Platform-independent intermediate representation (.class files)
javac The Java compiler (source → bytecode)
classpath List of directories and JARs where the JVM looks for classes
JAR Java Archive — a ZIP of compiled classes and resources
LTS Long-Term Support — a release maintained for several years (e.g., Java 8, 11, 17, 21)

Summary

Java is a statically typed, object-oriented, platform-independent language backed by a massive ecosystem and decades of production use. Its compile-to-bytecode model and the JVM enable the "Write Once, Run Anywhere" promise. In the next lesson, we will set up a development environment and write our first Java program.