This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Raymond Tong wrote:There is no instance of T1 created and calling the run() method.
Correct. Besides, your class T1(why classname is T1? ) is not a thread or a Runnable.
What you are doing is:
Start a 'blank' thread - which actually does nothing:
Above code will call default run method of Thread class.
What you need to do is:
1) Create a class that extends Thread or implements Runnable
2) Override run method
3) Create a thread which accepts object of your thread/runnable implementation
4) Start the thread