All learning paths · 5 concepts · 50 min
☕ Java concurrency
One whiteboard and two writers, private notepads, café buzzers, busy waiters and a careful cleaner.
- 🖊️Threads, locks and race conditionsTwo people updating one whiteboard tally: a single marker pen means only one writes at a time.
- 🗒️The Java memory model and volatileWorkers copy the main board onto private notepads; marking an item "main board only" keeps everyone up to date.
- 📟CompletableFuture and asyncOrdering at a café and getting a buzzer: order everything at once, sit down, and collect when it buzzes.
- 🤵Virtual threadsA few waiters serving hundreds of tables, pinning each order to the pass instead of waiting beside one table.
- 🧹Garbage collectionA playroom cleaner who only throws out toys nobody can reach any more, tidying the new-toy box most often.