Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Difference between Thread and Timer

 
Raja ji
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi to all,

Can anybody tell me what is the differece between Timer and Thread.
When to use Timer and when to use Thread.
 
madan singh
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,

You can start the timer on some specific time but not in case of thread.
Thread can implements Singleton(to make low heapSize).
 
Ulf Dittmer
Rancher
Posts: 42969
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A Timer is essentially a thread scheduled for execution at one ore more specific times. If you look at the API for TimerTask (which is what gets scheduled), you'll see that it is just about the same as Thread.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic