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

Thread and Runnable

 
farooq ahamad
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI,

what is the internall meaning of this.if we pass object as argument

MyRunnable r=new Myrunnable();
Thread t=new Thread(r);
 
Henry Wong
author
Marshal
Pie
Posts: 22112
88
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Well, basically, when the Thread object is used to start another thread, this newly started thread will execute the run() method of the Runnable object.

Henry
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic