匿名内部类线程的实现
*/
public static void main(String[] args) {
new Thread() {
public void run() {
for (int i = 0; i < 40; i++) {
System.out.println("执行");
}
}
}.start();
new Thread(new Runnable() {
public void run() {
System.out.println("bu执行");
}
}).start();
}
|
|