Java Core
From your first program to classes, interfaces, collections, exceptions, lambdas, streams and a final project.
Tests check every exercise: in your browser and in the cloud
The course runs on the site: theory, quizzes and code exercises that the site checks itself, so you need nothing installed to take it. To run the lesson examples on your own computer, set it up in two steps.
Install the JDK
The lessons use Java 25 (the current long-term support release).
- Open Eclipse Temurin 25, pick your operating system and download the JDK installer (
.msion Windows,.pkgon macOS). - Run the installer and accept the defaults. The installation guide shows how to check that Java is installed on Windows, macOS and Linux.
- Open Eclipse Temurin 25, pick your operating system and download the JDK installer (
Install IntelliJ IDEA
Download IntelliJ IDEA — the free version is enough.
- Create a new Java project and choose the JDK 25 you installed.
- Add a class
Main, paste a program from a lesson and press the green Run button besidemain. JetBrains' first Java application guide walks through it with screenshots.
Syllabus
- Strings and their methodsTheory
- Quiz — substringQuiz
- Strings are immutableTheory
- Quiz — toUpperCase without assignmentQuiz
- == and equals for stringsTheory
- Quiz — new String and ==Quiz
- StringBuilderTheory
- Quiz — append and reverseQuiz
- The char typeTheory
- Quiz — 'a' + 'b'Quiz
- Exercise: run-length encodingExercise
- What an exception isTheory
- try and catchTheory
- Quiz — the order of catch blocksQuiz
- finallyTheory
- Quiz — try, catch and finallyQuiz
- Checked and uncheckedTheory
- Quiz — throws forgottenQuiz
- throw and your own exceptionsTheory
- Quiz — throw or throwsQuiz
- try-with-resourcesTheory
- Quiz — the order resources closeQuiz
- Exercise: age checkExercise
- Generics: List<String>Theory
- Quiz — List<int>Quiz
- ArrayListTheory
- Quiz — remove(1) on a List<Integer>Quiz
- Iterating and immutable listsTheory
- Quiz — add to List.ofQuiz
- HashSet, equals and hashCodeTheory
- Quiz — equals without hashCodeQuiz
- HashMapTheory
- Quiz — put with the same keyQuiz
- Comparable and sortingTheory
- Quiz — compareTo and sortingQuiz
- Exercise: word frequencyExercise
- Lambda expressionsTheory
- Quiz — a lambda changes a variableQuiz
- Function, Predicate and method referencesTheory
- Quiz — andThenQuiz
- ComparatorTheory
- Quiz — reversedQuiz
- Stream API: filter, map, collectTheory
- Quiz — filter and mapQuiz
- Lazy streamsTheory
- Quiz — a stream with no terminal operationQuiz
- OptionalTheory
- Quiz — orElseQuiz