From 05bef690dad0f7c0240e683567ea3a1bf81f6d2b Mon Sep 17 00:00:00 2001 From: duanledexianxianxian Date: Tue, 5 Nov 2019 19:33:42 +0800 Subject: [PATCH] init project --- .../main/java/com/duanledexianxianxian/leetcode/Foo.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/leetcode1114/src/main/java/com/duanledexianxianxian/leetcode/Foo.java b/leetcode1114/src/main/java/com/duanledexianxianxian/leetcode/Foo.java index cf1538d..72ce3b0 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) { -- GitLab