Ulf Dittmer wrote:
Because the method that would print "Cat" is overridden by the method that prints "Dog".
To be a little bit more exact ... it is because the run() method of the
Thread class is overridden by the method that prints "Dog". The Thread class run() method, if not overridden, would have checked to see if a runnable is assigned, and if so, will call the Runnable's run() method. And of course, the Runnable's run() method would have printed "Cat".
Henry