This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes Java in General and the fly likes Types of Threads Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Types of Threads" Watch "Types of Threads" New topic
Author

Types of Threads

chander shivdasani
Ranch Hand

Joined: Oct 09, 2007
Posts: 206

I was browsing through some java websites and i stumbled upon different types of threads like worker threads, system threads .

So, in all, how many different types of threads are there?. Also, i know the thread that we create by implementing the runnable interface. Where does this thread fit in the classification?


Enjoy, Chander
SCJP 5, Oracle Certified PL/SQL Developer
Rajkamal Pillai
Ranch Hand

Joined: Mar 02, 2005
Posts: 443
    
    1

Hi,

To my knowledge there are two types of threads.

  • Daemon thread
  • Non-daemon thread


  • Cheers,
    Raj.
    Jesper de Jong
    Java Cowboy
    Saloon Keeper

    Joined: Aug 16, 2005
    Posts: 14278
        
      21

    "Worker threads", "system threads" and other kinds of threads are not really totally different kinds of threads. There isn't a fixed list of types of threads. What "type" you'd assign to a thread depends on what you are using the thread for. A thread that does work in the background you could call a "worker thread", for example.

    You can't say what type of thread a thread is that you create yourself by implementing the Runnable interface.

    Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 8 API documentation
     
    I agree. Here's the link: http://aspose.com/file-tools
     
    subject: Types of Threads