Write Java like a professional: generics, lambdas, streams, safe values, concurrency, patterns and tests.
- 28 lessons
- 7 units
- 5 h 39 m in all
- £0, for good
what’s inside.
For people who build things on their own and want code that others trust and can change.
Java Level 3 is for learners who have finished Levels 1 and 2. In 28 lessons you master generics, lambdas, streams, Optional, immutable objects, threads, thread pools, futures, design patterns, the JVM and testing, with a guess, a hands-on task and a fix-the-bug challenge in every lesson. It ends with a level check: a concurrent word counter, polished and tested, that you ship yourself.
every lesson goes the same way.
- meet it
- guess first
- your turn
- fix it
- nailed it
unit 1
Generics
Write one piece of code that works safely for many types.
unit 2
Lambdas
Pass behaviour around like a value.
- Lambdas12 minWrite a small piece of behaviour as a value and hand it over.
- Functional interfaces11 minGive your lambdas a type of your own.
- The built-in toolkit12 minUse Java's ready-made lambda types instead of writing your own.
- Method references12 minPoint at a method that already exists, and sort by several keys.
unit 3
Streams
Process whole collections in clear, step-by-step pipelines.
- Stream pipelines12 minFilter and change a whole collection in one readable pipeline.
- Numbers from streams11 minCount, add up and check whole collections in one go.
- Sort, slice and flatten12 minOrder a stream, take the top few, and open up nested lists.
- Grouping with collectors13 minTurn a stream into a table of counts, a sentence or two piles.
unit 4
Safe values
Make missing values and surprise changes impossible.
- Optional instead of null12 minSay "there might be nothing here" in a way nobody can ignore.
- Optional chains12 minWork inside an
Optionalwithout opening it by hand. - Immutable objects12 minBuild objects that can never change after they are made.
- Unmodifiable collections12 minHand out lists and maps that nobody can tamper with.
unit 5
Threads
Run work at the same time without losing a single result.
- Threads12 minRun two jobs at the same time and wait for both to finish.
- Race conditions13 minSee why shared counters lose updates, and lock them with
synchronized. - Atomic values11 minCount across threads without writing a single lock.
- Thread-safe maps13 minLet many threads fill one map without losing a count.
unit 6
Tasks
Hand work to thread pools and futures, and collect every answer.
- Thread pools12 minHand jobs to a team of reusable threads instead of making your own.
- Futures13 minGet an answer back from every job, in the order you asked.
- CompletableFuture12 minChain steps that run in the background, one after another.
- Combining and recovering13 minWait for several background jobs at once, and survive when one fails.
unit 7
Like a professional
Shape, check and test your code the way working developers do.
- The strategy pattern12 minSwap one way of doing a job for another without touching the code that uses it.
- The builder pattern13 minCreate objects with many optional settings, clearly and safely.
- Inside the JVM12 minSee where your variables and objects live, and how memory is cleaned up.
- Testing like a pro13 minProve each small piece works, including the awkward cases.