Life cycle and states of Thread

Like every object, Java thread also has its own life cycle and it goes into different states in its entire life cycle. The various states of java thread are as below 1) New 2) Runnable 3) Running (Not a defined state, but we will use it for better understanding) 4) Waiting 5) Timed Waiting 6) […]

Share this article on

Creating and starting Threads

Thread creation in Java ? We learned in our previous article that “ thread ” is an instance of “Thread” class. Please read Introduction-to-threads article before reading further. Threads can be created using any one of the 2 ways 1) Implementing the java.lang.Runnable interface. 2) Extending the java.lang.Thread class In both the ways, we need […]

Share this article on
< Previous Next >