• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

start() in Thread.!!!!

 
sharma anurag
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 11061
13
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic