Question: are static variables thread safe java?
Answer: 3) Locking is one way of achieving thread-safety in Java. 4) Static variables if not synchronized properly become a major cause of thread-safety issues. ... 7) local variables are also thread-safe because each thread has there own copy and using local variables is a good way to write thread-safe code in Java.