java 中使用线程的方法到底有哪些?

一般都说有2种 继承Thread类和实现Runnable 接口。
不过上次看到个实例:
public class s1 {
static void meyhod(Thread thread)
{
System.out.println("begin:"+thread.getName());
try {
thread.sleep(2000);
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
System.out.println("end:"+thread.getName());
}

}
它是以参数形式 调用Thread这也可以么? 这也属于继承?
望高人指点。

第1个回答  2015-11-12
继承runnable接口

实现 重写run方法
第2个回答  2015-11-30
实现Runnable接口或扩展Thread类
还可以实现Callable<?>类,Callable相对于Runnable是有返回值的
第3个回答  2015-09-28
thread runnable
下面的start()方法
相似回答