When I should use
class MyThread extends Thread implements Runnable{
//any statement.
}
And what is the significance of using both type of thread creation at a single time.
You should almost never do that. The type Thread already implements Runnable.
The only reason to do this is if you want to be explicit in your source code.
both type of thread creation
There is only one way to create a thread: creating a Thread instance and invoking its start() method. Runnable is just an interface.
implements Runnableis redundant: Thread implements runnable, and MyThread extends Thread, therefore MyThread implements Runnable whether you say so or not.