Why Use Threads?

Understanding how threads work is important for building better-performing, scalable applications. It's also important for supporting multiple users using a single application and having the application seem responsive to the user's requests.

Another good reason to understand multithreading is because one of the great advances Java makes over other programming languages is its built-in, native support for threading. By using threading, you can avoid long pauses between what your users do and when they see things happen. Better yet, you can send tasks such as printing off into the background while other threads concentrate on handling new requests.

Get Special Edition Using Java 2 Standard Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.