RizTech Academy logo
RizTech Academy
Getting StartedLesson 1 of 415 min

What Java is and why it is everywhere

Java has a reputation problem. Half the people who tell you it is verbose and old-fashioned learnt it from a syllabus written before 2014, and the Java they are describing genuinely was. The other half work at a bank, an insurer or a product company running millions of lines of it and would be surprised to hear it called old.

Both are looking at the same language ten years apart. Before you install anything, it is worth understanding which Java you are about to learn, and — just as importantly — what it will not do for you.

What Java actually is

Java is a programming language with two features that shape everything else about it.

It is compiled, but not to machine code. You write .java files. A program called javac translates them into .class files containing bytecode — instructions for an imaginary machine. A second program, the JVM, runs that bytecode on your real machine. The next lesson takes this apart properly, because it explains half of Java's behaviour.

The practical effect: there is a step between saving and running. In Python you save and run. In Java you compile, and the compiler refuses if anything does not add up.

It is statically typed, and strictly so. Every variable has a declared type and cannot hold anything else. This is the trade at the heart of the language:

int quantity = 12;
quantity = "twelve";   // does not compile

Python would accept that reassignment happily and fail later, at runtime, possibly in production on a Saturday. Java refuses to build. The cost is that you write more, and the compiler argues with you during your first week. The benefit is that a whole category of mistake cannot reach a running system, and your editor can tell you what a variable is without guessing.

That trade is worth making on a codebase of two hundred thousand lines with fifteen people touching it, which is exactly where Java lives. It is a poor trade for a twenty-line script to rename some files. Use Python for that.

Where Java actually runs

Not a list of features — a list of places your code would go.

Enterprise backends. Banking, insurance, telecom billing, logistics, payment switches, government systems. If an Indian company has been running software for more than a decade and handles money, there is Java in it. Spring Boot is the framework, and it appears in more backend job advertisements in India than anything else.

Android. The Android platform itself is Java, and Android apps ran on Java for a decade. Google now prefers Kotlin and so do we — but Kotlin runs on the same JVM, calls the same libraries, and reading Java is not optional on an Android team with any history.

Data infrastructure. Kafka, Elasticsearch, Cassandra, Hadoop, Spark and Jenkins all run on the JVM. A data engineering role will have you reading their stack traces sooner or later.

Long-lived systems where uptime matters. The JVM has had thirty years of work put into garbage collection, monitoring and profiling. When a Java service misbehaves at 2am, there are mature tools to find out why. That is an unglamorous advantage and a real one.

What Java is not for

Being straight about this saves you months.

  • Code inside a browser. That is JavaScript, full stop. Java applets died long ago and the names being similar is a historical accident, not a relationship.
  • iOS apps. Swift, on a Mac. Java is not a route to the App Store.
  • New Android apps. Kotlin. Java will work, but you would be choosing the older language on purpose. Take the Kotlin course if Android is your goal — though finishing this one first is not wasted, because Kotlin's whole design is a reaction to Java's.
  • Short scripts and one-off automation. Python. The ceremony Java asks for is the wrong price to pay for forty lines.
  • Machine learning and data science. Python again. The libraries are there.
  • Anything where startup time dominates. A JVM takes a moment to warm up. For a command-line tool run five hundred times in a shell loop, that moment adds up.

The Java you will learn, and the Java you will read

This matters more in Java than in most languages, because the gap between the two is wide.

A class holding three values, written the way most college syllabuses teach:

public class Item {
    private final String name;
    private final int pricePaise;
    private final int quantity;

    public Item(String name, int pricePaise, int quantity) {
        this.name = name;
        this.pricePaise = pricePaise;
        this.quantity = quantity;
    }

    public String getName() { return name; }
    public int getPricePaise() { return pricePaise; }
    public int getQuantity() { return quantity; }

    @Override
    public boolean equals(Object o) { /* twelve more lines */ }
    @Override
    public int hashCode() { /* three more */ }
    @Override
    public String toString() { /* four more */ }
}

Around forty-five lines. The same thing in modern Java:

public record Item(String name, int pricePaise, int quantity) {}

One line, and it generates the constructor, the accessors, equals, hashCode and toString for you. This is the same language. Records arrived in Java 16, in 2021.

You will learn the modern form as the default, and you will also learn the long form — because the code you are paid to work on will be full of it, and "I only know the new syntax" is not a useful position in an interview or a code review.

Here is what has changed in the decade most teaching missed:

Feature Since What it replaced
Lambdas and streams Java 8 Loops that built up a list by hand
var for local variables Java 10 HashMap<String, List<Item>> m = new HashMap<String, List<Item>>();
Text blocks Java 15 Multi-line strings glued with \n and +
Records Java 16 Forty-five-line data classes
switch as an expression Java 14 switch statements with fall-through bugs
Sealed types Java 17 Comments saying "do not subclass this"
Pattern matching for switch Java 21 Chains of if (x instanceof Y) with casts

Every row is in this course.

Which version, and what LTS means

Java gets a new release every six months. Most are short-lived. Every few years one is designated LTS — long-term support — and those are the ones companies actually deploy:

Release Date Status
Java 8 March 2014 LTS. Still in production in a great many places.
Java 11 September 2018 LTS. Common in older systems.
Java 17 September 2021 LTS. Very widely deployed.
Java 21 September 2023 LTS. What this course uses.
Java 25 September 2025 LTS. Newest. Everything here runs on it unchanged.

This course targets Java 21. It is the version most teams have standardised on, it has every feature above, and code written for it runs on 25 without changes. If you install 25 instead, nothing in this course will break — but install 21 if you have the choice, because matching the version in job descriptions is worth something.

One thing to know now and stop worrying about: Java is free. You will hear confusing things about Oracle licensing. The build you will install is an OpenJDK build — the same source, compiled and distributed by a vendor such as Eclipse Adoptium — and there is nothing to pay. The install lesson says exactly which one to download.

Where this course takes you

By the last module you will have built a command-line tracker for a Pune tiffin service: subscribers on monthly plans, deliveries logged per day, a month-end report of who owes what. It reads and writes its own data files, refuses bad input with a message a human can act on, has tests that run in a second, and packages into a single jar file you can hand to somebody. Built with Maven, tested with JUnit — the same two tools as a real backend project.

Along the way, the things tutorials skip: how to read a Java stack trace, what NullPointerException is really telling you, why equals and hashCode must agree, and when object-oriented design stops helping and starts getting in the way.

Check your work

No code yet, so nothing to run — but three things worth being able to answer before you move on.

Why does Java compile to bytecode instead of machine code? So that one compiled artefact runs on any machine with a JVM — your Windows laptop, a colleague's Mac, a Linux server in a data centre. The JVM is the part that differs per platform, not your .class files.

Name two things Java is genuinely a poor choice for. Any two of: code running inside a browser, iOS apps, short automation scripts, machine learning, new Android apps, and anything where JVM startup time dominates. If your own goal appeared on that list, finding out now is the useful outcome of this lesson.

Which version does this course use, and what does LTS mean? Java 21, an LTS release — one of the every-few-years releases that receive years of updates and that companies therefore actually deploy. The six-monthly releases in between are short-lived.

Practice

No compiler yet. Two things instead, and the first one genuinely matters.

  1. Search a job site for "Java developer" in your city and open five listings. Write down every technology named that you do not recognise. You will meet Spring Boot, Maven or Gradle, JUnit, SQL, Git, and probably Docker. This course covers Maven, JUnit and Git; the Spring course on this site follows on. Keep that list — it is a more honest curriculum than any roadmap graphic, and revisiting it in two months is a good measure of progress.

  2. Write down, in one sentence, what you want to be able to build. "A backend that handles payments for a small business" beats "learn Java". Around week three, when the compiler is refusing something and you cannot see why, that sentence is what brings you back to the keyboard.

Next: what the JDK, the JRE and the JVM actually are — three names for things people routinely confuse, including in interviews.

Stuck on this lesson?

Being stuck is part of it — but being stuck alone for three days is not. Our internship programme pairs this curriculum with code review and one-to-one help from working developers, and it is free.

About the internship