Err... how can a Thread have another Thread as its target? I don't see any constructors or methods which achieve this. For comparision, the constructor Thread(Runnable target) makes a runnable object the target for a Thread. But I don't see a Thread(Thread target) anywhere.
Jim, Do you think the question meant this? What do you say is right.There is no Thread constructor taking a Thread object as an input.But the class java.lang.Thread class itself implements the Runnable interface which means a Thread object can be substituted for an Runnable object right? I checked this with the foll. code. It compiles and prints 'maha'. regds maha anna
posted 20 years ago
Oops. I missed the obvious. Thanks maha anna!
"I'm not back." - Bill Harding, Twister
So there I was, trapped in the jungle. And at the last minute, I was saved by this tiny ad: