You are trying to synchronize an object with automatic warping, which will be a different object each time.
synchronized((Integer)common){
The thing is to synchronize the same object in each thread. Even if you did commonbe Integer, once you assign it to a different value, it will be a different object.
. , :
private final static Object lock = new Object();
private static int common = 0;
...
synchronized (lock) {
common++;
}
, AtomicInteger. - - .
private static AtomicInteger common = new AtomicInteger(0);
...
// no need to synchronize since that is handled by the class
common.incrementAndGet();