Skip to content
Warlock spell

Java

Ranks 1-3

The warlock's Unending Breath: the enterprise elemental, verbose, explicit, and effectively immortal. It will outlive us all.

Wears the Classic spell Unending Breath.

Coming from Python: Python rank 7 maps directly: classes, imports, collections with different names. Static typing will feel like TypeScript's stricter ancestor, and everything is a class whether you like it or not.

Advertisement

Summoning the language

Rank 1

First summoning

Modern Java runs single files directly: save the incantation as Hello.java and type java Hello.java. The ceremony of public class and static void is the language putting on its armor before speaking.

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

// $ java Hello.java
Rank 2

The temper

Types everywhere, and the collections are typed too: a List<String> cannot hold an Integer, and the compiler enforces it at birth. Records give you small immutable data carriers without the old boilerplate.

record Spell(String name, int rank) {}

List<Spell> book = List.of(new Spell("fireball", 3));
book.forEach(s -> System.out.println(s.name()));
// var infers: var level = 60;
Rank 3

First real chore

Build one small class-based command line tool (a habit tracker again: it translates across every language in this book), then take the web framework path your course or job uses and serve one endpoint. Java rewards patience; the walls it builds are load-bearing.

// $ javac Habit.java && java Habit
// then the starter guide for the framework your shop uses
Back to the grimoireThe Programmer's GrimoirePython, the eight ranks, and every second spell.