A thread is a basic processing unit to which an operating system allocates processor time,and more than one thread can be executing code inside a process. |
Every Java program has at least one thread, the thread that executes the Java program. It is created when you invoke the static main method of your Java class. |
There are two ways to create a thread. |
|
|
Every Thread has a state and a Thread can be in one of these six states. |
|
The values that represent these states are encapsulated in the java.lang.Thread.State enum. The members of this enum are NEW, RUNNABLE, BLOCKED, WAITING, TIMED__WAITING, and TERMINATED. |
This blog is for all those who wants to learn new technologies and various programming languages. Enjoy Learning Regards
Search This Blog
Wednesday, 25 July 2012
Threads in JAVA
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment
Thanks for feedback,
Your opinion will surely help me to enhance the quality of the content.