How do you implement Thread in Java?

Compiled By Unknown - No Comments
At language level, there are two ways to implement Thread in Java. An instance of java.lang.Thread represent a thread but it need a task to execute, which is instance of interface java.lang.Runnable. Since Thread class itself implement Runnable, you can override run() method either by extending Thread class or just implementing Runnable interface.

Tags:

No Comment to " How do you implement Thread in Java? "