摘要:
1,继承自Thread类public class Thread1 extends Thread{ @Override public void run() { System.out.println(this.getName()); } public static void main(String[] args) { Thread1 t = new Thread1(); t.start(); }}2,实现Runnable接口(使用Runnable接口更加灵活)public class T { private String name; public T(String name){ this... 阅读全文
posted @ 2012-11-19 17:34
心意合一
阅读(120)
评论(0)
推荐(0)
浙公网安备 33010602011771号