| 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.
|
 |
 |
|
|
subject: general query on thread api java doc
|
|
|