Creating a Thread by Extending Thread class