Are static variables shared between threads?
There isn’t anything special about static variables when it comes to visibility. If they are accessible any thread can get at them, so you’re more likely to see concurrency problems because they’re more exposed. There is a visibility issue imposed by the JVM’s memory model. Here’s an article talking about the memory model and how … Read more