1. A Java Class is said to be threadsafe, if it behaves the same way in both single and multi threaded environment.
2. A Java Class should always be designed by keeping "multi-threaded issues" in mind, as these days, the Java Class hardly work in Single threaded environment. When a class is being called by a framework, it is most likely invoked by a thread. A typical example is a TimerTask invoked by Timer.
3. Stateless objects are always thread safe. By stateless objects we mean those objects of classes which do not have any instance variables defined to hold the state of the object. The objects of these classes are always thread-safe, because there is no data to share between threads.
4. What are class invariants?
The states of objects that have some relationship to each other all the time. Say, for example, if there are two instance variables inside an object which are related like dateOfBirth and Age, then whenever dateOfBirth gets updated, the age should be updated atomically. The class invariants here are dateOfBirth and age and these must always be protected within a critical section.
5. What is reentrancy?
The intrinsic locks (the object locks) is acquired on a per-thread basis, as opposed to, a per-invocation basis in posix threads. The default locking behavior of pthreads (posix threads) mutexes are on per-invocation basis. The JVM associates a counter with the thread and whenever the thread which already acquired the lock tries to grab the same lock again, the JVM allows the thread to proceed further, after incrementing the associated counter. This is defined as reentrant.
6. Significance of volatile variables.
In multi-processor/multi-core CPU hardware, there are optimizations to temporarily store data in CPU cache or registers for a while, before updating the in-memory location. For a thread to always make sure that, it reads the most recent value of a shared data, mark it as volatile. So that, the underlying optimizations on locality of references are turned off.
7. Immutable objects are always thread safe. The objects whose state cannot be changed after construction are said to be immutable. When a state cannot be modified, it is always thread-safe.

