# Java Level 8: Concurrency

> Level 8: Concurrency of the LoWisa Java course: Threads and Executors, Synchronisation and Shared State, Modern Concurrent Java. 3 lessons and 9 ideas, each explained in one line.

Concurrency is level 8 of 16 of the [LoWisa Java course](/courses/java/). It has 3 lessons and 9 ideas. Below is every lesson and what it teaches, in one line each.

## Threads and Executors

- **Threads.** A **thread** is an independent line of execution: the JVM runs many at once across cores.
- **Executors.** An **ExecutorService** owns a pool of threads and runs submitted tasks: never hand-spawn threads in application code.
- **Virtual threads.** **Virtual** threads are cheap JVM-managed threads by the million: blocking code that scales like async.

## Synchronisation and Shared State

- **Race conditions.** Two threads mutating one value interleave into a **race**: counter++ is three steps, not one.
- **synchronized and locks.** The **synchronized** keyword lets one thread at a time through a block: mutual exclusion around shared state.
- **volatile and visibility.** Without synchronisation, one thread’s writes may stay **invisible** to another: the memory model is real.

## Modern Concurrent Java

- **Concurrent collections.** **ConcurrentHashMap** and friends handle locking internally: shared maps without hand-rolled synchronisation.
- **CompletableFuture.** A **CompletableFuture** composes async steps: thenApply, thenCombine: pipelines instead of callback nests.
- **Immutability wins.** The strongest concurrency tool is **immutable** data: what cannot change cannot race.

## Before and after this level

- **Before:** [Level 7: Files & I/O](/courses/java/level-7-files-and-i-o/): Files and Streams, NIO, Serialisation and Data Handling.
- **Next:** [Level 9: JVM & Memory](/courses/java/level-9-jvm-and-memory/): Heap, Stack and Object Allocation, Garbage Collection, JVM Runtime Behaviour.

In the app each of these ideas is taught and then asked back, and the level ends with a checkpoint and flashcards. See [Checkpoints and flashcards](/help/checkpoints-and-flashcards/).

## Frequently asked questions

### What does Java Level 8: Concurrency cover?

Threads and Executors, Synchronisation and Shared State, Modern Concurrent Java: 3 lessons and 9 ideas.

### What should I know before this level?

The level before it, Level 7: Files & I/O, which covers Files and Streams, NIO, Serialisation and Data Handling.

## Learn Java on your phone

The first level is free. LoWisa is on Google Play and the App Store.

---

Source: https://lowisa.dev/courses/java/level-8-concurrency/ · Updated 2026-11-16
