It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Programming Java Forum

Is it run() method for a thread?

Is it run() method for a thread?

Postby sasi on Wed May 02, 2007 6:18 am

Hai everybody,

I need to clarify a dout regarding thread's, means we all write the run()method(what is the purpose of it?),as per i concern it is meant for contineous running purpose,so we are telling for contineous running we implement run method, so is their any requirement to specify any loop inside the run method for contineous running or not is the question?



regards,
sasi.
sasi
 
Posts: 13
Joined: Mon Apr 23, 2007 1:10 pm

Postby marecki6000 on Sat May 05, 2007 3:49 pm

Well, your vision is incorrect.

It is not "meant for contineous running purpose". It is simply an entry point to the thread (invoked by start() method), such as main function is an entry point for java application.
If you want a thread to run continuously, you would have to define your own loop inside run method.

regards
Marek
marecki6000
 
Posts: 6
Joined: Thu Apr 26, 2007 10:18 pm


Who is online

Users browsing this forum: No registered users and 1 guest