aspose file tools*
The moose likes JSP and the fly likes Why start() method Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "Why start() method" Watch "Why start() method" New topic
Author

Why start() method

Akhil Nagpal
Greenhorn

Joined: Sep 18, 2002
Posts: 5
HI,
why we call the start() method of the class extending the Thread class instead of run() method.
Akhil
Bosun Bello
Ranch Hand

Joined: Nov 06, 2000
Posts: 1510
Calling the start() method will cause the run() method to be called.


Bosun (SCJP, SCWCD)
So much trouble in the world -- Bob Marley
Nathan Pruett
Bartender

Joined: Oct 18, 2000
Posts: 4121

start() sets up threading and makes the run() method run in a separate thread. If you just call run(), it will run in the current thread.


-Nate
Write once, run anywhere, because there's nowhere to hide! - /. A.C.
 
 
subject: Why start() method