Commit 05bef690 authored by duanledexianxianxian's avatar duanledexianxianxian 😁

init project

parent 6df3f402
......@@ -4,6 +4,7 @@ import java.util.concurrent.CountDownLatch;
/**
* Hello world!
* https://zhuanlan.zhihu.com/p/81626432
*
* @author Administrator
*/
......@@ -38,12 +39,12 @@ class Foo {
}
public static void main(String[] args) {
Foo foo=new Foo();
Foo foo = new Foo();
// 创建3个线程
Thread thread1 = new Thread(() -> {
try {
foo.first(()->{
foo.first(() -> {
System.out.println("1");
});
} catch (InterruptedException e) {
......@@ -53,7 +54,7 @@ class Foo {
Thread thread2 = new Thread(() -> {
try {
foo.second(()->{
foo.second(() -> {
System.out.println("2");
});
} catch (InterruptedException e) {
......@@ -63,7 +64,7 @@ class Foo {
Thread thread3 = new Thread(() -> {
try {
foo.third(()->{
foo.third(() -> {
System.out.println("3");
});
} catch (InterruptedException e) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment