diff --git a/leetcode1114/src/main/java/com/duanledexianxianxian/leetcode/Foo.java b/leetcode1114/src/main/java/com/duanledexianxianxian/leetcode/Foo.java index cf1538d5feb1b57762f5741f76e111ac48b85515..72ce3b0ce53c756f07c6f9c09706f8c949197c2d 100644 --- a/leetcode1114/src/main/java/com/duanledexianxianxian/leetcode/Foo.java +++ b/leetcode1114/src/main/java/com/duanledexianxianxian/leetcode/Foo.java @@ -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) {