You are viewing a free preview of this lesson.
Subscribe to unlock all 10 lessons in this course and every other course on LearningBro.
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).
java.time packageinstanceof, and recordsJava 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
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.
Java is one of the most in-demand languages in enterprise software, financial services, health-care, and government.
| 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 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.
| 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 |
| 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) |
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.