14
Wow, that's a loaded question.
To put it simply, you need to ensure that access to any shared data is carefully synchronized. E.g., you may want to synchronize access to a static variable with a mutex or a synchronized function.
Note that you may also need to synchronize at higher levels if you need atomic transactions that modify multiple shared resources at the same time.
Designing a concurrent application is not simple, and there is no magic bullet (unfortunately). I highly recommend the book "Java Concurrency in Practice" for more information on writing safe concurrent code.