• 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
Sheriff
Posts: 22614
111
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
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!