• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
Bartenders:
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis

general query on thread api java doc  RSS feed

 
Ranch Hand
Posts: 924
1
Fedora Java Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
please refer the link http://docs.oracle.com/javase/6/docs/api/java/lang/Thread.html#run(). the javadocs for the run() method says that



what does it mean by SEPARATE RUNNABLE RUN OBJECT ?

Second part of my question is that suppose i have following snippet of code :



as mentioned in comments, is "r" the separate runnable object the above javadoc is talking about ?

thirdly, if we have something like this



here what is target runnable ? is it t (since t also implements Runnable) ?
 
Ranch Hand
Posts: 296
Eclipse IDE Firefox Browser Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please do not post duplicate posts, give some time to the members to answer your query.
 
gurpeet singh
Ranch Hand
Posts: 924
1
Fedora Java Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks sumit. I thought maybe the thread has fallen in the black hole and since the post was also focusing on separate issue, so started a new thread.
 
Ranch Hand
Posts: 451
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mythread is a runnable because Thread is a Runnable. I think t.start() executes the run () method of Mythread.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!