> can we run a run() method with out using a start() method in a program?
Yes, but it won't work the way you expect it to work.
Calling the run() method directly would be like calling a normal method. No thread of execution is created, no concurrency. On the other hand, calling the start method spawns a new thread of execution which can execute concurrently with other threads by executing the run() method.
~s.o.s~
Failure as a human
11,938 posts since Jun 2006
Reputation Points: 3,281
Solved Threads: 734
Yes, but it won't work the way you expect it to work.
it will work!!! but only as a method, not thread. It won't run simultaneously :)
ProgrammersTalk
Junior Poster in Training
84 posts since Jun 2007
Reputation Points: 21
Solved Threads: 7
it will work!!! but only as a method, not thread. It won't run simultaneously :)
If you read his thread,
that is exactly what he said.
;-)
masijade
Industrious Poster
4,253 posts since Feb 2006
Reputation Points: 1,471
Solved Threads: 494
If you read his thread,
that is exactly what he said.
;-)
haha sorry, I just realized that once I re read it again... my bad... XD
ProgrammersTalk
Junior Poster in Training
84 posts since Jun 2007
Reputation Points: 21
Solved Threads: 7