package ru.job4j.taskSynchronize;

import net.jcip.annotations.GuardedBy;
import net.jcip.annotations.ThreadSafe;

@ThreadSafe
public class Counter {

    @GuardedBy("this")
    private int count = 0;

    public int increment() {
        synchronized (this) {
            return count++;
        }

    }

    public int getCount() {
        return count;
    }
}

@@ -324,24 +324,58 @@
 etCount() %7B%0A
+        synchronized (this) %7B%0A    
         retu
@@ -384,16 +384,26 @@
  count;%0A
+        %7D%0A
     %7D%0A%7D%0A

edit task 1102