Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

please send responces......

 
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 Hand
Posts: 732
4
  • 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
Saloon Keeper
Posts: 15214
36
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic