In the loop in the main thread, the reference to tt is simply being used to call the method printMsg(). Calling this method on a Thread object is no different than calling a method on a non-Thread object -- it's just an instance method.
The separate thread is initiated by calling start(), and the code that executes in that thread is contained within the run() method.
(Note: Please use Code Tags to keep your code formatting intact.) [ March 28, 2006: Message edited by: marc weber ]
"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer sscce.org