why thread class is provided when we can create a thread using runnable interface.
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 35241
7
posted
0
Welcome to JavaRanch.
There are times when you need the greater flexibility that extending Thread gives you over implementing Runnable. See ExtendingThreadVsImplementingRunnable for more information.
Since the question has nothing to do with applets -which is what this forum is about- I'll move it to the Threads and Synchronization forum.
Note that you can't "create a thread using runnable interface"; the magic code that actually schedules the OS-level thread to run your code in parallel is in the native methods of the Thread class.