Hi. I'm a new greenhorn here. Hello to everyone. I'm taking the JDK1.4 certification this Thursday. I was wondering if anyone could shed some light on something I've been pondering for a while. Why is it ok to call the join() method on a thread that hasn't been started yet? Does the call simply get ignored or what? Thank you very much. Gisselle.
To get a good idea of what is going on, you should browse the source of the java.lang.Thread class. In a nutshell, join() invokes join(0) which in turn invokes wait(0) while isAlive() returns true. Basically, if the thread on which join() has been invoked has not been started yet, the call to join() should return immediately. [ January 13, 2003: Message edited by: Valentin Crettaz ]