• Post Reply Bookmark Topic Watch Topic
  • New Topic

all setDaemon() after the thread is started  RSS feed

 
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
 
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!"
 
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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!