O'Reilly logo

Java All-in-One For Dummies, 4th Edition by Doug Lowe

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 1

Programming Threads

In This Chapter

arrow Examining threads

arrow Creating threads from the Thread class

arrow Working with the Runnable interface

arrow Creating threads that cooperate

arrow Executing threads

arrow Making methods cooperate

arrow Using a lock

arrow Interrupting threads

Remember the guy from the old Ed Sullivan Show who used to spin plates? Somehow, he managed to keep all those plates spinning, running from pole to pole to give each plate a little nudge — just enough to keep it going.

In Java, threads are the equivalent of the spinning-plate guy. Threads let you divide the work of an application into separate pieces, all of which then run simultaneously. The result is a faster and more efficient program, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required