Answers to Exercises

Each of Chapters 1 through 8 closes with an “Exercises” section that tests your understanding of the chapter’s material. The answers to those exercises are presented in this appendix.

Chapter 1: Threads and Runnables

  1. A thread is an independent path of execution through an application’s code.
  2. A runnable is a code sequence encapsulated into an object whose class implements the Runnable interface.
  3. The Thread class provides a consistent interface to the underlying operating system’s threading architecture. The Runnable interface supplies the code to be executed by the thread that’s associated with a Thread object. ...

Get Java Threads and the Concurrency Utilities now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.