This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes all the methods of thread Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "all the methods of thread" Watch "all the methods of thread" New topic
Author

all the methods of thread

Venkat Ramsimha
Ranch Hand

Joined: Dec 28, 2004
Posts: 127
hi all,

Is it possible to implement all the thread methods(say..start(),run(),wait(),notify(),notifyAll(),sleep(),dead(),etc., with in a sample program.If so
can anyone display a program impementing all the thread methods.Also please
mention the usage of each thread method as where and when to use..


looking forward....

tx&best regards
venkat
Kris Reid
Ranch Hand

Joined: Jan 05, 2005
Posts: 247
They are already implemented as Thread is a class.

You can however extend Thread and override the methods.
The methods in Thread are native methods so overriding them will change there behavour and it will no long run as new Thread.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: all the methods of thread
 
Similar Threads
StringBuffer & StringBuilder and equals()
More Generic questions but WITH code!!
notify() in threads
single thread model
Why are notify() & notifyAll() are in Object class??where aswe call from Thread class