| Author |
Run method question
|
Dinesh Tahiliani
Ranch Hand
Joined: Aug 06, 2007
Posts: 486
|
|
Can we overload or override the run method of thread? If yes, can you explain me with example please...
|
Thanks<br />Dinesh
|
 |
ramesh maredu
Ranch Hand
Joined: Mar 15, 2008
Posts: 210
|
|
run method is also like normal method we can overload and override it,in fact it is already overrided in Thread class, it is actually from Runnable interface. If we override run method in our class when thread is started it will call our run method,but if we overload it,it will not get called automatically.
|
SCJP 1.5 94%.
The greatest glory in living lies not in never falling, but in rising every time we fall.
|
 |
Ben Souther
Sheriff
Joined: Dec 11, 2004
Posts: 13410
|
|
Again... Dinesh, wouldn't it have been faster and more meaningful for you to try do do this in a small program of your own?
|
Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
|
 |
 |
|
|
subject: Run method question
|
|
|