References & Landscapes
Java has an unusually deep documentation culture for a language its age, and much of it is free. The hard part is not finding material, it is choosing: a beginner following every link will spend a year reading and never ship anything. The table at the end of this page routes you from what you want to build to the two or three resources worth your time.
Playgrounds & Online Compilers
You do not need to install a JDK to start. These sites run Java in the browser, which is enough for everything in the Lab Examples page except file input.
Run Java in the Browser
| Service | What it is good for |
|---|---|
| dev.java Playground | The official JDK playground: share a snippet, run it, pick the JDK version |
| JDoodle | Run a single file and read the compiler output; no account needed |
| OneCompiler | Multi-file projects in the browser when a demo outgrows one class |
| Replit | A persistent workspace with a terminal, for projects you return to |
JShell — the JDK's Own REPL
Every JDK since 9 ships with jshell. It is not a web toy: it is the real compiler and the real runtime, with an interactive prompt. Type an expression, see the value, then keep the history as a scratchpad. It is the fastest way to check what Math.round does with a negative argument, or what a text block really produces.
$ jshell
jshell> var words = List.of("alpha", "beta", "gamma")
words ==> [alpha, beta, gamma]
jshell> words.stream().map(String::toUpperCase).toList()
$1 ==> [ALPHA, BETA, GAMMA]
jshell> /exit
Inside the track's pages, code samples are highlighted but not executed. jshell closes that gap in one keystroke, and unlike an online playground it runs against the exact JDK version you compile with.
Official Documentation
Four entry points cover almost every question. The API reference is where you look up a class; the learning trail is where you read about a topic; the language specification is where you settle an argument; and the release notes are where you find out which JDK introduced a feature.
| Resource | What it answers |
|---|---|
| JDK API Specification | Every class and method, with the contracts and the exceptions it throws |
| dev.java — Learn | The current official tutorial trail, replacing the older Java 8 tutorial |
| Java Language Specification | The normative answer, including why the compiler rejected your code |
| Migration Guides | What changed between JDK versions and what is now deprecated |
| JEP Index — OpenJDK | The design proposals behind records, sealed types, pattern matching |
The JDK Toolchain
Java's build tools are famous, but the JDK itself ships with everything needed for small and medium work. Learning these first makes it obvious what Maven and Gradle are automating later.
| Tool | What it does |
|---|---|
javac | Compile source files to bytecode; -d chooses the output directory |
java | Run a compiled class; since JDK 11 it can also run a single .java file directly |
jshell | Interactive REPL over the real compiler and runtime |
javap | Disassemble a class file and inspect the bytecode the compiler produced |
jar | Package classes and resources into one archive |
jdeps | Report which packages a class or jar depends on |
jconsole / jcmd | Inspect a running JVM: threads, heap, and GC behaviour |
javadoc | Turn /** ... */ comments into an HTML API reference |
The build tools you will meet next are Maven, which is declarative and configuration-first, and Gradle, which is a program and therefore more flexible. Maven Central is the default repository both of them fetch from, and it is also the place to check a library's latest version and its licence.
Free Courses & Books
Structured material, in the order a course would present it. Pick one and finish it rather than three at once — the value is in the sequence, not the collection.
| Course | What it covers |
|---|---|
| dev.java Learn Trail | The official path, from first class to modules and concurrency |
| Baeldung — Java Tutorials | Short, focused articles; the fastest answer for a specific API |
| Jenkov — Java Tutorials | Clear explanations of concurrency and I/O, with diagrams |
| Princeton — Introduction to CS | A university course in Java; free books, lectures, and exercises |
| java-next — modern features | The design work behind pattern matching and records, explained in talk notes |
| The Java Tutorials (legacy) | The older Oracle trail — still useful for its exhaustive breadth |
Source Code to Study
Reading well-written Java teaches faster than reading more tutorials. These repositories are worth an hour each, and all of them can be read in the browser without a build.
| Repository | What to look for |
|---|---|
| openjdk/jdk | The standard library: how java.base is organised and documented |
| google/guava | Library design at scale: immutability, builders, and careful Javadoc |
| spring-projects/spring-boot | How a framework wires itself together from annotations |
| junit-team/junit5 | The smallest serious framework: extensions, annotations, and clean APIs |
| iluwatar/java-design-patterns | Every classic pattern, implemented and explained in one repository |
Community & Help
Where to ask when you are stuck, and where the answer is already written. Search first: for a language this old, nearly every error message has an answer from a decade ago that is still correct.
| Place | Use it for |
|---|---|
| Stack Overflow — Java tag | Well-posed questions with a minimal, compilable example |
| OpenJDK mailing lists | Language and library design discussions, straight from the authors |
| r/java | News, release announcements, and opinionated help |
| inside.java | Short articles from the JDK team about new features |
| OpenJDK Developers' Guide | How the JDK itself is built, if you want to contribute |
How to Choose & Next Steps
With this much material available, the risk is reading instead of writing. The plan below keeps the balance, and the table after it routes you from what you want to build to the resources worth your time.
A plan that keeps you coding
1. FINISH THIS TRACK, IN ORDER
Every lesson has compilable examples; nothing here is theoretical.
Compile roadmap/java/demo/*.java as you go — they are the small wins.
2. WRITE THE THREE STUDY PROJECTS
Word frequency, task scheduler, ledger report (samples.html).
Type them; do not copy. Break them on purpose.
3. PICK ONE REAL PROBLEM
Something you would otherwise do in a spreadsheet or a script.
Small enough to finish, real enough that you care about the answer.
4. READ ONE GOOD LIBRARY
Choose the project closest to your problem and read its source.
Java is verbose but it is readable, and the conventions you absorb
are worth more than any style guide.
5. THEN GO BROAD
dev.java for structure, Baeldung for depth, the JLS when both are
silent, and the API documentation for everything in between.
| If you want to… | Start with | Then |
|---|---|---|
| Understand the object model | Classes and Objects | The JDK source for java.lang.Object, then the design patterns repository |
| Write modern Java | Records, Sealed Classes | The JEPs behind them, then pattern matching in a switch |
| Process data | Collections | Stream pipelines, then the java.util.stream documentation |
| Build a server or API | Interfaces | Spring Boot's tutorial, then read its source |
| Ship a tool others can run | Packages | jar, then Gradle or Maven and a published release |
| Make slow code fast | Performance | jcmd and a profiler, then measure before you change anything |
| Write code others can trust | Lab Examples | JUnit 5, then a test for every bug you fix |
The last suggestion is the one that matters: choose a problem you actually have. Every feature in this track exists because somebody needed it, and the fastest way to remember a feature is to need it.
Return to the Java roadmap to track progress, or revisit any lesson: the sidebar on every page lists the full chapter outline.