Welcome to Java: Write Once, Run Anywhere
Java was released by Sun Microsystems in 1995 (Sun was later acquired by Oracle, which maintains Java today) and was built around a single defining promise: “write once, run anywhere.” Rather than compiling directly to a specific computer’s machine code, Java compiles to an intermediate format called bytecode, which runs on the Java Virtual Machine (JVM) — the exact same compiled bytecode runs unmodified on Windows, macOS, and Linux, as long as each has a JVM installed.
Nearly three decades later, Java remains one of the most widely deployed languages on Earth. It powers the majority of Android apps, is the backbone of countless large-scale enterprise systems at banks and insurance companies, and runs distributed systems at companies like Netflix and LinkedIn. Its reputation for stability and backward compatibility — code written for Java 8 still generally runs on the newest Java releases — is a major reason large organizations continue to build on it.
Installing the JDK
You need a JDK (Java Development Kit), which includes both the compiler and the runtime. Eclipse Temurin and Oracle’s own build both work equally well for learning:
java --version
javac --version
If either command isn’t recognized, download a JDK installer from adoptium.net (Temurin) or oracle.com, and make sure the installer adds Java to your system PATH — the same PATH concept you’ll encounter with every language in these courses.
Your first program
public class Hello {
public static void main(String[] args) {
System.out.println("Hello, Tutoline!");
}
}
Save this as Hello.java — the filename must exactly match the public class name, including capitalization, or the compiler will refuse to build it. Compile it with javac Hello.java (this produces a Hello.class bytecode file), then run the compiled class with java Hello (note: no .class extension on this second command).
Understanding the boilerplate
Unlike Python or JavaScript, every Java program lives inside a class — there’s no code that floats outside one. public static void main(String[] args) is the fixed entry point every Java program starts from: public means it’s callable from outside the class, static means it belongs to the class itself rather than to an object, void means it returns nothing, and String[] args receives any command-line arguments passed in when the program runs.
What you’ll build across this course
By the end of this course you’ll be writing methods, working with Java’s collection types, building your own classes with proper encapsulation and inheritance, handling exceptions the way production code does, and using generics, streams, and basic multithreading — the same toolkit used in real enterprise Java systems.
Notice every Java program lives inside a class — there’s no code that floats outside one, unlike Python or JavaScript.