Well done!
You now know the core of Java: variables, decisions, loops, arrays, methods, classes, inheritance, interfaces, exceptions, collections, generics, lambdas, streams, dates, files and threads. That is the same core that professional Java developers use every day.
Set up Java on your own computer
- Install a JDK – for example Eclipse Temurin from adoptium.net (pick the latest LTS version).
- Install an editor: IntelliJ IDEA Community (free) is the most popular for Java. VS Code with the Java extensions also works well.
- Create
Main.java, then compile and run it from a terminal:
javac Main.java
java MainSince Java 11 you can even skip the first step for a single file: java Main.java.
Newer Java features to look up
This course uses Java 8, so its code runs everywhere (including in your browser here). Newer versions add some nice shortcuts. You don't need them, but you'll see them in modern code:
| Feature | Version | What it does |
|---|---|---|
var | 10 | let Java work out a local variable's type: var list = new ArrayList<String>(); |
| Text blocks | 15 | multi-line strings between """ marks |
| Switch expressions | 14 | case 1 -> "Mon"; with no break needed |
| Records | 16 | a one-line class for plain data: record Point(int x, int y) {} |
| Pattern matching | 16+ | if (a instanceof Dog d) checks and casts in one step |
// Java 16+ only: a record gives you a constructor, getters, equals, hashCode and toString for free
record Point(int x, int y) {}
// Java 14+ only: a switch that gives back a value
String name = switch (day) {
case 1 -> "Monday";
case 2 -> "Tuesday";
default -> "Another day";
};Where Java can take you
| Path | Learn next |
|---|---|
| Back-end / web developer | Spring Boot, REST APIs, SQL databases, JPA/Hibernate |
| Android developer | Android Studio (and Kotlin, which feels very similar to Java) |
| Software engineer | data structures and algorithms, unit testing with JUnit, design patterns |
| Security | how Java web apps get attacked and defended – see our Web Pentesting course |
Build tools
Real projects use a build tool – Maven or Gradle – to download libraries and build the program with one command. IntelliJ can create a Maven or Gradle project for you.
Remember: The best way to keep learning is to build small things you care about: a quiz game, an expense tracker, a to-do app. Keep practising with the challenges here and in Java Labs.