• Post Reply Bookmark Topic Watch Topic
  • New Topic

all setDaemon() after the thread is started  RSS feed

 
Remko Strating
Ranch Hand
Posts: 893
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
com.enthuware.ets.scjp.v5.2.465



Enthuware states that the code will not compile, but using JDK 1.5.0._05 to code compiles and gives an IllegalThreadStateException which was my answer
 
Arnav Velimala
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"You cannot change the state of a thread once it is started!"
 
Barry Gaunt
Ranch Hand
Posts: 7729
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Remko Strating:
com.enthuware.ets.scjp.v5.2.465


Enthuware states that the code will not compile, but using JDK 1.5.0._05 to code compiles and gives an IllegalThreadStateException which was my answer


I agree, it should not give rise to a compilation error.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!