aspose file tools*
The moose likes Beginning Java and the fly likes start() in Thread.!!!! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "start() in Thread.!!!!" Watch "start() in Thread.!!!!" New topic
Author

start() in Thread.!!!!

sharma anurag
Greenhorn

Joined: Aug 29, 2007
Posts: 16
Hi,
to all my friends from javaranch.!!!
shall anybody explain what happened when i write start method 2 times
in my application?
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10451
    
    8

Originally posted by sharma anurag:
Hi,
to all my friends from javaranch.!!!
shall anybody explain what happened when i write start method 2 times
in my application?


You cant do it twice. You will get Duplicate Method compile time error.


[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
Stan James
(instanceof Sidekick)
Ranch Hand

Joined: Jan 29, 2003
Posts: 8791
Or are you asking about this?

That will compile but won't work. Try it and see what the exception says, then read the JavaDoc on Thread.State.


A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: start() in Thread.!!!!