Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Types of Threads

 
chander shivdasani
Ranch Hand
Posts: 206
Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?

 
Rajkamal Pillai
Ranch Hand
Posts: 445
1
Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

To my knowledge there are two types of threads.

  • Daemon thread
  • Non-daemon thread


  • Cheers,
    Raj.
     
    Jesper de Jong
    Java Cowboy
    Saloon Keeper
    Pie
    Posts: 15441
    41
    Android IntelliJ IDE Java Scala Spring
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    "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.
     
    • Post Reply
    • Bookmark Topic Watch Topic
    • New Topic