Udemy
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
Java Multithreading & Concurrency: Beginners, Drawn Simply
New
15 students

Java Multithreading & Concurrency: Beginners, Drawn Simply

Race conditions, locks, deadlocks, thread pools and virtual threads, drawn so you remember, in 87 minutes
Created byAls Yo
Last updated 11/2026
English
English

What you'll learn

  • Start threads and wait for them correctly, and stop a thread politely with interrupt()
  • Spot a race condition in Java code, fix it with synchronized or AtomicInteger, and know why volatile alone doesn't
  • Explain how a deadlock and a livelock happen, find a deadlock with jstack, and prevent both
  • Use thread pools, Callable and Future, BlockingQueue and ConcurrentHashMap the way real Java services do
  • Know when virtual threads (Java 21) help and when they don't
  • Answer the common Java concurrency interview questions in one clear sentence each

Course content

6 sections • 26 lectures • 1h 35m total length
  • Meet Thread House: the bug every Java developer meets2:15
  • Set up Java 21 and run your first program1:07
  • Test every program on your own machine7:06

Requirements

  • You can write a small Java program with classes, methods and loops
  • Java 21 or newer installed (lesson 0.2 shows how to check), any editor or IDE
  • No threads experience needed

Description

This course contains the use of artificial intelligence.

The board said 1 drink left. The fridge was empty. Nobody stole it.

That's a race condition, and by lesson 2.2 you'll know exactly how it happened, why it happens in real programs every day, and the one word that fixes it.

This is Java concurrency and multithreading for people who have never written a thread. It is 87 minutes long, and that is on purpose.

Why 87 minutes

Most courses on threads run three to six hours. This one teaches the concepts you actually meet, says plainly what it leaves out, and then stops. One idea per lesson, about 2 to 7 minutes each, never sped up. Races and deadlocks play in slow motion first, so you can see each step.

Why it's drawn

Every idea is one drawing before it is any code. Housemates fighting over the fridge board is a race condition. Two of them freezing while one holds the TV remote and the other holds the batteries is a deadlock. Hiring cleaners who take jobs off a queue is a thread pool.

That picture is the part you still have months later, when a real bug at work looks familiar and you know which tool it needs. Then you see the same thing as plain Java 21 code, you run it, and you read the real output.

I've built software for 20 years, trained more than five teams of 20 people from zero Java to architect level, and interviewed hundreds of Java developers. Threads are where good developers go quiet: why did two threads lose an update? How does a deadlock form? This course closes that gap, fast.

What makes it different

  • Every line of output is real. Every program on screen was run on Java 21, and a test runs each one 20 times to check it still tells the same story.

  • Proof under the hood. jstack names a real deadlock. A thread dump shows a pool's threads still waiting when you forget to close it.

  • Check it on your own machine. One command runs every program and tells you whether your setup behaves like the course.

  • Your turn in almost every lesson. Change one number, guess what happens, run it. Every lesson ships a zip with every file shown, and each Your turn has an exercise sheet with the answer on page 2.

  • At work. Each section ends with the same bug in a real system: a half-built sales report, a cinema selling one seat twice, a bank transfer that freezes, a web page stuck behind slow emails.

  • A project to finish. A funfair ticket app with 4 hidden bugs, one from each section. Find them, fix them, then watch the fixes.

What's inside

  1. Why one housemate isn't enough: Thread, start() vs run(), join(), interrupt(), daemon threads

  2. The fridge problem: shared fields, race conditions, synchronized, volatile, AtomicInteger

  3. House fights: deadlock, lock ordering, ReentrantLock.tryLock, livelock

  4. Hiring help: thread pools, Callable and Future, BlockingQueue, ConcurrentHashMap.merge, and virtual threads

  5. Fix the house: the project

Plus the 17 House Rules on one page, each with the line to say in an interview.

Where this course stops

It is a first course in Java concurrency and multithreading, so it leaves out the Java memory model in depth, CompletableFuture, structured concurrency, CountDownLatch, semaphores and fair locks. Those are planned for a follow-up advanced course. If you already write concurrent Java for a living, this one is not for you.

About AI in this course

The narration is an AI voice and the drawings were made with AI tools. Everything that decides whether this course is correct is mine: I wrote and planned every lesson, and every program on screen was run and tested on Java 21, with a test that runs each one 20 times to check it still tells the same story.

Who this course is for:

  • Java developers who have never written multithreaded code, or who copy it without being sure why it works
  • Students preparing for Java interviews that ask about threads, locks and thread pools
  • Not for: experienced concurrency developers looking for the memory model or CompletableFuture in depth