just a code snippet about multi-thread in java

1
2
3
4
5
6
7
8
9
10
11
12
13
public class MultiThreadTest {
@Test
public void test() throws Exception {
for(int i = 0; i < 5; ++i) {
new Thread() {
public void run() {
//dosomething;
}
}.start();
}
Thread.sleep((long)10000);
}
}