• 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: 42970
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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!