File tree Expand file tree Collapse file tree
src/main/java/core/basesyntax Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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'
Original file line number Diff line number Diff line change 11package core .basesyntax ;
22
33public 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}
You can’t perform that action at this time.
0 commit comments