Dog. Coz your code instantiates the anonymous class extending Thread and assigns the object reference to t.
<i>If there were no Exceptions (not Errors!), Life would have kinda sucked!!</i>
Joined: Feb 28, 2008
But isn't there a rule that says the runnable object that is passed to the thread gets its run method called.
Joined: Nov 27, 2007
If you didnt have that anonymous class definition , it would have constructed a Thread object using the constructor Thread(Runnable r). BUT here your code instantiates a subclass of Thread (not the Thread class), declared anonymously and assigns its ref to "t". Anonymous class has to do what its created for.