aspose file tools
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes general query on thread api java doc Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Reply Bookmark "general query on thread api java doc" Watch "general query on thread api java doc" New topic
Author

general query on thread api java doc

gurpeet singh
Ranch Hand

Joined: Apr 04, 2012
Posts: 868

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) ?


OCPJP 6(100 %) OCEWCD 6(91 %)
Sumit Patil
Ranch Hand

Joined: May 25, 2009
Posts: 296

Please do not post duplicate posts, give some time to the members to answer your query.


Thanks & Regards, Sumeet
SCJP 1.4, SCWCD 5, LinkedIn Profile
gurpeet singh
Ranch Hand

Joined: Apr 04, 2012
Posts: 868

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.
Helen Ma
Ranch Hand

Joined: Nov 01, 2011
Posts: 451
Mythread is a runnable because Thread is a Runnable. I think t.start() executes the run () method of Mythread.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: general query on thread api java doc
 
Similar Threads
general question on threads?
Query on threads ?
Thread Question
Problem in thread
Thread Doubt