When is a Thread considered Active?

At the first glance it may seem that a Thread is active during the period between the call to the start() method and a short time period after the stop() method is called. In other words a Thread is Active if it is alive i.e isAlive() method returns true.

However if the definition of an Active Thread is a thread is a thread whose thread reference appears in the active count reference by the activeCount() method, we have a different definition of Active Thread. If a Thread Object is constructed but it is not started, the thread object will not be removed from the enumeration list, even if the original reference to the Object is lost. The Thread is removed from the Thread array either when the thread is stopped or when the run() method has completed.

Inheritance or Implementation in Threads

The main choose between the two is based on personal preference and mainly the clarity of solution. It is easier to use one technique for certain tasks and another method for some other tasks, like since the RWLock Object inherits from Thread, it makes the code easy to understand and clean, since locking is provided as a separate feature.

Can I start a stopped Thread?

When a Thread is stopped, the state of the thread object is set so that it is not restart able. If we try to restart a stopped Thread Object by calling the start method start() nothing happens. The start() will not thrown an exception and the run() method will not be called. The isAlive() method will not return true.