Skip to content

Commit c7184a9

Browse files
committed
solution
1 parent ea9bb2d commit c7184a9

2 files changed

Lines changed: 7 additions & 4 deletions

File tree

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ jobs:
77
runs-on: ubuntu-latest
88

99
steps:
10-
- uses: actions/checkout@v2
10+
- uses: actions/checkout@v4
1111
with:
1212
ref: ${{github.event.pull_request.head.ref}}
1313
repository: ${{github.event.pull_request.head.repo.full_name}}
1414
- name: Set up JDK 17
15-
uses: actions/setup-java@v2
15+
uses: actions/setup-java@v4
1616
with:
1717
java-version: '17'
1818
distribution: 'adopt'
Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
package core.basesyntax;
22

33
public class Main {
4-
public static void main(String[] args) {
4+
public static void main(String[] args) throws InterruptedException {
55
Counter counter = new Counter(20);
66
for (int i = 1; i <= 20; i++) {
7-
new MyThread(counter, String.valueOf(i)).start();
7+
MyThread myThread = new MyThread(counter, String.valueOf(i));
8+
9+
myThread.start();
10+
myThread.join();
811
}
912
}
1013
}

0 commit comments

Comments
 (0)