Hi Prasanna ... Thread is not a reserved
word for Java , then it's possible to create a class named Thread .. Why is YouThread extending from your class Thread ? Because you put it in the same package where YouThread.java is and the classes in the package (default or others ) have precedence over other class sources..including the API.
Then , YouThread finds Thread in the same package and extends it . If you move your class Thread to other location your program will compile and run well . I tested it ... by the way , check out your
for cicle .. it will print a lot of numbers as Mr. Friedman-Hill said ..
regards Jorge