Start Learning
Javaneer
Back to stage
Stage 0·Meet Java

What Is Java?

What programming means, what Java is, and why it runs everything from Android phones to banks and Netflix.

12 min readBeginner
On this page

Welcome! If you have never written a single line of code, you are in exactly the right place. By the end of this lesson you'll know what programming is, what Java is, and why it quietly runs a huge part of the modern world.

What is programming, really?

A computer is astonishingly fast but completely literal. It does exactly what it is told - nothing more, nothing less. Programming is the act of writing those instructions in a language the computer can eventually understand.

Programming is like writing a recipe

A recipe is a precise list of steps: "Add two eggs. Stir for one minute. Bake at 180°C." Anyone who follows it gets the same cake. A program is a recipe for a computer - a precise list of steps it follows every single time, without ever getting bored or improvising.

The catch is that computers don't understand English (or German). They ultimately only understand machine code - long strings of 1s and 0s. Writing that by hand would be miserable, so we use friendly programming languages instead, and a translator turns our code into something the machine can run.

Java is one of those friendly languages - and one of the most important ever created.

So what is Java?

Java is a high-level, object-oriented programming language. Let's unpack that phrase without any jargon:

  • High-level - it reads much more like English than like 1s and 0s, so humans can actually work with it.
  • Object-oriented - you model your program as a collection of "objects" (like a Car, a BankAccount, or a Player) that hold data and can do things. You'll learn all about this in Stage 2.

Here is a complete, real Java program. Don't worry about understanding every symbol yet - just notice that you can almost read it:

public class Hello {
    public static void main(String[] args) {
        System.out.println("Hello, Java!");
    }
}

When you run it, the computer prints:

Output

Hello, Java!

That one line - System.out.println(...) - literally means "print this line of text to the screen." You just read your first Java program. 🎉

You don't need to memorize syntax yet

Right now, the goal is only to recognize the shape of a Java program. We'll break down every keyword - public, class, void, main - piece by piece in the coming lessons.

Where does Java actually run?

This is where Java's magic lives. Most of your code runs on top of something called the Java Virtual Machine (JVM) - a program that runs your program.

The JVM is like a universal power adapter

When you travel, a universal adapter lets the same laptop charger work in any country's wall socket. The JVM does the same for code: you write your Java once, and a JVM built for Windows, macOS, Linux, or a phone runs it - unchanged. This famous promise is called "Write Once, Run Anywhere."

We'll explore the JVM in detail in The Java Ecosystem, but keep this mental picture: your code → the JVM → any machine.

Why should you learn Java?

Java has been around since 1995, and far from fading away, it powers an enormous amount of the software you use every day:

WhereExamples
MobileThe Android operating system and countless apps
EnterpriseBanks, insurance, airlines, government systems
Big techNetflix, Amazon, Google, LinkedIn back-ends
GamesMinecraft - one of the best-selling games ever
Big dataHadoop, Spark, Kafka and much of the data world

Because so much critical software is written in Java, skilled Java developers are consistently among the most in-demand and well-paid engineers in the industry. Learning it is a genuinely valuable investment.

Java vs. JavaScript - not the same!

Despite the similar names, Java and JavaScript are completely different languages - about as related as car and carpet. JavaScript mainly runs in web browsers; Java runs on the JVM. This lesson (and this whole site) is about Java.

Quick check

What does the phrase 'Write Once, Run Anywhere' refer to?

Key takeaways

  • Programming means writing precise, literal instructions for a computer.
  • Java is a popular, high-level, object-oriented programming language created in 1995.
  • Java code runs on the Java Virtual Machine (JVM), which enables 'Write Once, Run Anywhere'.
  • Java powers Android, banking systems, Netflix, Minecraft, and much of big tech.
  • Java and JavaScript are entirely different languages.

Next up, we'll travel back to 1991 and meet the small team that created Java - and discover why it was almost called Oak.