wood burning stoves 2.0*
The moose likes Beginning Java and the fly likes How does one get the run() method of a thread to go? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "How does one get the run() method of a thread to go?" Watch "How does one get the run() method of a thread to go?" New topic
Author

How does one get the run() method of a thread to go?

kenny gill
Ranch Hand

Joined: Mar 12, 2012
Posts: 54

I'm trying to make a short answer of this question but can't find any exact information on the question.

Could someone please share some information?
Steve Luke
Bartender

Joined: Jan 28, 2003
Posts: 4181
    
  21

A good place to start looking is here: http://docs.oracle.com/javase/tutorial/essential/concurrency/

To get a precise answer to "how does one get the run() method of a [T]hread to go?" you need to define what it means to "go". If it just means execute, then you can call it like any other method. If 'go' means execute concurrently to the current thread as a separate thread of execution, then the answer is to call the Thread object's start() method.


Steve
Mansukhdeep Thind
Ranch Hand

Joined: Jul 27, 2010
Posts: 1157

kenny gill wrote:
I'm trying to make a short answer of this question but can't find any exact information on the question.

Could someone please share some information?


There is no short way out if you really want to learn something. If we simply tell you the answer, it would not benefit you. Neither would you be able to fully appreciate why things are the way they are. You should be willing to dig deep and do the hard work.


~ Mansukh
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How does one get the run() method of a thread to go?