Heres the code about threads.....I dont know the difference between those 2 new() statements.
Output is Dog But why and how ?
Because you override
, so this method is eventually executed when you
start the thread. The default
delegates to the passed-in
. Rule of thumb: Either provide a
, but don't do both!