What Is a Thread?
Creating and Running Threads in Java
Using wait() and notify()
The Java Event Model
When to Use Threads
When Not to Use Threads
Sum It Up: Thread Pools
It's lunchtime, and you decide to treat yourself to a meal at your favorite restaurant. You take a seat and look around—the place is pretty empty. There's one waiter, one customer eating, and you.
The waiter is helping the other customer, but oddly, you're being ignored. Even when you ask for a menu, the waiter acts as if you're not there and just refills the other customer's beverage. Finally, after the other customer leaves, the waiter acknowledges your existence and helps you.
So what is the problem? The waiter hasn't been fired, ...