public static void main(String[] args) throws Exception {
for (int i = 0; i < 500; i++) {
startThread();
}
}
public static void startThread() {
new Thread() {
public void run() {
System.out.println(this.currentThread().getName()+"开始时间[" + System.currentTimeMillis());
try {
moderationImageDemo();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
System.out.println(this.currentThread().getName()+"结束时间[" + System.currentTimeMillis());
}
}.start();
}
for (int i = 0; i < 500; i++) {
startThread();
}
}
public static void startThread() {
new Thread() {
public void run() {
System.out.println(this.currentThread().getName()+"开始时间[" + System.currentTimeMillis());
try {
moderationImageDemo();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
System.out.println(this.currentThread().getName()+"结束时间[" + System.currentTimeMillis());
}
}.start();
}