Google News
logo
Java Multithreading - Interview Questions
How is thread-safety achieved in multithreaded programming?
Thready safety can be achieved if multiple threads can use a particular class function without the occurrence of the race condition. In Multithreaded programming, thread safety can be achieved by :

* Synchronization
* Use of atomic wrapper class
* Use of a volatile keyword
* Employing a lock-based mechanism
Advertisement