Threads in Java
Threads in Java
Since Java does not permit multiple inheritance, it is sometimes more convenient to implement the run() method in a class not derived from Thread but from the interface Runnable.
public interface Runnable {
public abstract void run();
}
class MyRun implements Runnable{
public void run() {
//.....
}
}