+1 vote
in JAVA by
How to use ++ operator is thread-safe in Java?

1 Answer

0 votes
by

Is ++ operator is thread-safe in Java?

No, it’s not a thread-safe operator because it involves multiple instructions like reading a value, incriminating it and storing it back into memory which can be overlapped between multiple threads.

Related questions

0 votes
asked Jan 24, 2020 in JAVA by rahuljain1
+1 vote
asked May 31, 2020 in JAVA by SakshiSharma
...