Next Steps with Java

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

  1. Install a JDK – for example Eclipse Temurin from adoptium.net (pick the latest LTS version).
  2. Install an editor: IntelliJ IDEA Community (free) is the most popular for Java. VS Code with the Java extensions also works well.
  3. Create Main.java, then compile and run it from a terminal:
javac Main.java
java Main

Since 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:

FeatureVersionWhat it does
var10let Java work out a local variable's type: var list = new ArrayList<String>();
Text blocks15multi-line strings between """ marks
Switch expressions14case 1 -> "Mon"; with no break needed
Records16a one-line class for plain data: record Point(int x, int y) {}
Pattern matching16+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

PathLearn next
Back-end / web developerSpring Boot, REST APIs, SQL databases, JPA/Hibernate
Android developerAndroid Studio (and Kotlin, which feels very similar to Java)
Software engineerdata structures and algorithms, unit testing with JUnit, design patterns
Securityhow 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.

HOME LABS COMMUNITY DASHBOARD