LINKS

Java Tutor Homepage

Java Applications and Components

Java Applets and Components

Java Frequently Asked Questions:
    1. What is Inheritance?
    2. What is Polymorphism?
    3. What is Encapsulation?
    4. Avoiding the Divide by Zero Error
    5. Public Classes in Java Source Files
    6. The Import Statement in Java
    7. Classes with Default Access
    8. What are Local Variables?
    9. What is an Abstract Method?
    10. Data Structures
    11. What is Autoboxing and Auto-Unboxing?
    12. What is multithreading?
    13. What are Threads?
    14. Thread States
    15. What is the Purpose of Synchronization?
    16. Thread Interaction
    17. Can You Start a Thread Twice?

Java FAQ 12 - What is multithreading?

Multithreading is the process of using running multiple code statements at once. Every program has at least one thread. In the case of programs with only one thread, that thread is simply running through the program. It is possible however to run multiple code statements at once. The benefit of this is that it allows your program to do more than one thing at a time. In a normal program with only one thread, if the program is reading data from the hard drive, the program can’t do anything else until reading the data from the hard drive is complete. In a multithreaded program however, one thread of the program could do something else, say add some numbers together, while the other thread of the program is reading data from the hard drive.