Skip to content

Commit abfc0fb

Browse files
author
fanxb
committed
update main
1 parent bf492c5 commit abfc0fb

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

Diff for: 2.javaThreadDemo/src/Main.java

+16-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,22 @@
1+
import java.util.concurrent.*;
2+
13
public class Main {
24

35
public static void main(String[] args) {
46
System.out.println("Hello World!");
5-
System.out.println("当前线程名为:"+Thread.currentThread().getName());
6-
System.out.println("当前线程id为:"+Thread.currentThread().getId());
7+
System.out.println("当前线程名为:" + Thread.currentThread().getName());
8+
System.out.println("当前线程id为:" + Thread.currentThread().getId());
9+
}
10+
}
11+
12+
class Item implements Delayed {
13+
@Override
14+
public long getDelay(TimeUnit unit) {
15+
return 0;
16+
}
17+
18+
@Override
19+
public int compareTo(Delayed o) {
20+
return 0;
721
}
822
}

0 commit comments

Comments
 (0)