synchronized blocks the next thread's call to method
as long as the previous thread's execution is not finished.
Threads can access this method one at a time.
Without synchronized all threads can access this method simultaneously.
public class MyCounter {
private int count = 0;
public synchronized void add(int value){
this.count += value;
}
}