Threading
Learn about threading in Java.
StartThreading: Lesson
Lesson 1 of 1
- 1So far, we have learned about threads and how they work in theory. Before we put it into practice, we should have a strong understanding of what kinds of problems multi-threaded programs are best s…
- 2There are multiple ways to implement threading in Java. The first that we will try involves extending the Thread class. In Java, there is a built-in class that handles threads: java.lang.Thread. …
- 3In the previous exercise, you learned that you can convert a class to run as a thread by extending the Thread class. Java allows us to make classes threaded in another way as well, by implementing …
- 4So far, you have seen how to start threads with the .start() method and learned multiple ways to implement threads into sequential programs. Sometimes, you want to be able to see the status of th…
- 5Another common scenario in multi-threaded programs is to wait for a thread to complete before proceeding in a path of execution. In other languages, this concept is called “awaiting” or “blocking…
- 6Another important scenario when working with multi-threaded programs is managing shared resources between threads. When you access the same data from two different threads, you may cause a _rac…
- 7Previously, we learned how to block thread execution using .join(). However, this is only to block thread execution from the context where the thread was started. For example, if a thread was creat…
What you'll create
Portfolio projects that showcase your new skills
How you'll master it
Stress-test your knowledge with quizzes that help commit syntax to memory