• Post Reply Bookmark Topic Watch Topic
  • New Topic

please send responces......  RSS feed

 
pathipaka shayampet
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why can`t we call start() method two times on asame Thread?
 
darshan karle
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It is like trying to start a Express train that is all ready running

regards
darshan
 
Norm Radder
Ranch Foreman
Posts: 2224
28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you tried it? Do you get an error message? What is the error message?
Please copy and paste it here.

What happens if you issue a start on a thread that was previously started and has ended by exiting the run() method? Write a test program and let us know.
 
Jesper de Jong
Java Cowboy
Sheriff
Posts: 16007
87
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Phatipaka, welcome to JavaRanch.

When you post a question, please use a meaningful subject line instead of something like "please send responces". An example of a better subject line for this topic is: "Why can't we call start() two times on a Thread?".
 
Piyush Porwal
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
once a thread has come out of its run() method, it is dead. You cannot invoke a dead thread again.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!