How to synchronize a static variable among threads running different instances of a class in Java? How to synchronize a static variable among threads running different instances of a class in Java? multithreading multithreading