• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
kenny gill
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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
Posts: 4181
22
IntelliJ IDE Java Python
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Mansukhdeep Thind
Ranch Hand
Posts: 1158
Eclipse IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic