摘要: 线程的实现方法有两种:1 实现runnable接口中的run方法class test implements Runnable{ public void run(){ //实现代码 }}使用时: Runnable r = new test(); Thread t = new Thread(r); t.start();2 构建Thread子类class test extends Thread{ public void run(){ //实现代码 }}直接new test().start()注意调用的的start方法,调用run方法只... 阅读全文
posted @ 2013-05-31 23:59 y.lucia 阅读(217) 评论(1) 推荐(0) 编辑