摘要: 1.java中有Thread 和 Runnable两种实现线程的方式。 package thread;public class MyThread extends Thread{private String name;private int tick = 10;public MyThread(String name){this.name = name;}public void run (){for(int i = 1;i 0)System.out.println(this.name + tick--);}}public static void main(String[] args) {MyRun 阅读全文
posted @ 2014-01-07 11:53 Dhyanas 阅读(100) 评论(0) 推荐(0) 编辑