File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes please send responces...... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "please send responces......" Watch "please send responces......" New topic

please send responces......

pathipaka shayampet

Joined: Jul 04, 2008
Posts: 5
Why can`t we call start() method two times on asame Thread?
darshan karle

Joined: May 09, 2008
Posts: 28
It is like trying to start a Express train that is all ready running

Norm Radder
Ranch Hand

Joined: Aug 10, 2005
Posts: 692
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

Joined: Aug 16, 2005
Posts: 15084

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?".

Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 8 API documentation
Piyush Porwal
Ranch Hand

Joined: Apr 09, 2008
Posts: 30
once a thread has come out of its run() method, it is dead. You cannot invoke a dead thread again.

-Piyush Porwal (Junk box)
I agree. Here's the link:
subject: please send responces......
It's not a secret anymore!