What is Java?
What Java is, why "write once, run anywhere" still matters, and where the language fits today.
2 min read
Java is a general-purpose, object-oriented programming language first released by Sun Microsystems in 1995 (now owned by Oracle). It's one of the most widely used languages in the world — it powers Android apps, huge chunks of enterprise backend systems, big data tooling like Hadoop and Kafka, and a long list of desktop and embedded software. If you've used a bank's internal systems, an Android phone, or a large e-commerce backend, there's a good chance Java was involved somewhere.
Compiled, then run on a virtual machine
Most languages are either compiled straight to machine code (like C) or interpreted line by line (like Python, in the classic sense). Java does something in between: your .java source file is compiled into bytecode, a platform-independent intermediate format, and that bytecode runs on the Java Virtual Machine (JVM).
public class Hello {
public static void main(String[] args) {
System.out.println("Hello, Java!");
}
}The JVM is what makes "write once, run anywhere" possible: the same compiled .class file runs unmodified on Windows, macOS, or Linux, as long as each has a JVM installed. You write and compile the code once; the JVM handles the platform-specific details.
Statically typed and object-oriented
Java is statically typed — every variable has a declared type, checked at compile time, not discovered at runtime. This catches a whole category of bugs (like passing a String where a number is expected) before the program ever runs.
Java is also thoroughly object-oriented: almost everything you write lives inside a class, and Java's core ideas — encapsulation, inheritance, polymorphism — show up constantly once you get past the basics. That's a different mental model from scripting languages where a file full of loose functions is normal.
Why Java has stuck around for 30 years
A few reasons Java remains a top-tier choice for serious backend work:
- Performance — the JVM's just-in-time (JIT) compiler optimizes hot code paths at runtime, getting Java within striking distance of natively compiled languages for many workloads.
- A massive ecosystem — decades of mature libraries, build tools (Maven, Gradle), and frameworks (Spring Boot, Quarkus) mean there's rarely a problem you have to solve completely from scratch.
- Backward compatibility — Oracle takes compatibility extremely seriously; code written for Java 8 still largely runs on Java 21.
- Strong tooling — IDEs like IntelliJ IDEA give Java some of the best autocomplete, refactoring, and debugging support of any language.
This course starts with the fundamentals — variables, control flow, methods — before moving into object-oriented Java, collections, and the modern features (streams, lambdas) that keep the language feeling current despite its age.
Test what you just learned
4 quick questions. Get all of them right to unlock the next lesson.
You can take the quiz without an account — logging in just lets your result count toward your progress.