Originally posted by Jothi Shankar Kumar Sankararaj:
Sanjeev,
My question is why even after overriding the start method in the the anonymous runnable class makes the run method is invoked and why not this happens with the thread class??
When you overriden the start() method of the Thread class, and then called that start() method, it will run your new start() method, and not actually start any threads -- hence, run() method will not be called.
When you created a start() method, in your anonymous runnable, you actually didn't override anything, as a runnable doesn't have a start() method. Furthermore, you didn't override the start method of the thread class, so when you called it, it creates a new thread, which calls the run() method of the runnable class.
Henry
[ December 22, 2006: Message edited by: Henry Wong ]