Q. What are the states in the lifecycle of a Thread? A java thread can be in any of following thread states during it's life cycle i.e. New, Runnable, Blocked, Waiting, Timed Waiting or Terminated.
Example of thread-safe class in Java: Vector, Hashtable, ConcurrentHashMap, String etc. Atomic operations in Java are thread-safe e.g. reading a 32 bit int from memory because its an atomic operation ...