Exercises

  1. 23.5 (True or False) State whether each of the following is true or false. If false, explain why.

    1. Method sleep does not consume processor time while a thread sleeps.

    2. JavaFX components are thread safe.

    3. (Advanced) Declaring a method synchronized guarantees that deadlock cannot occur.

    4. (Advanced) Once a ReentrantLock has been obtained by a thread, the ReentrantLock object will not allow another thread to obtain the lock until the first thread releases it.

  2. 23.6 (Multithreading Terms) Define each of the following terms.

    1. thread

    2. multithreading

    3. runnable state

    4. timed waiting state

    5. preemptive scheduling

    6. Runnable interface

    7. producer/consumer relationship

    8. quantum

  3. 23.7 (Advanced: Multithreading Terms) Discuss each of the following terms in ...

Get Java How To Program, Late Objects, 11th 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.