mohamed sanaullah wrote:You are overriding the run() method when you are creating a Thread instance.
Then how the previous one is different from this...
Now this prints Rat only. Now I am not overriding the Thread class's run() method, there shouldn't be any output then....