public class demo3_niming {
public static void main(String[] args) {
new Thread() {
public void run() {
for (int i = 0; i < 1000; i++) {
System.out.println("aaa");
}
}
}.start();
new Thread(new Runnable() {
public void run() {
for (int i = 0; i < 2000; i++) {
System.out.println("fff");
}
}
}).start();
}
}
|
|