| Author |
override start() method
|
pankaj patil
Ranch Hand
Joined: Dec 19, 2004
Posts: 98
|
|
hi if i override start() method in both the way of creating the thread ie extend Thread and implements Runnable then sholud i call run() explicitly in both the start() method . With Regards Pankaj
|
Regards,
Pankaj Patil
|
 |
Sravan Kumar
Ranch Hand
Joined: Sep 11, 2005
Posts: 121
|
|
You do not override start() method either way. If you extend Thread, you override run() and if you implement Runnable, you implement run() method. 1. Do not call run() explicitly. It does not spawn a new Thread. It will then be treated as a normal method call and will be run in the same Thread. 2. Do not override start() method. Leave it alone!. Just call it on the Thread object to spawn a new Thread. [ October 05, 2005: Message edited by: Sravan Kumar ]
|
keep smilin :: sravan<br /><a href="http://sravanpens.blogspot.com" target="_blank" rel="nofollow">I scribble here</a>
|
 |
pankaj patil
Ranch Hand
Joined: Dec 19, 2004
Posts: 98
|
|
|
Thanks for reply
|
 |
 |
|
|
subject: override start() method
|
|
|