Java Threading Race Condition
What is the primary concurrency issue demonstrated by the provided code?
A
The race condition is irrelevant because t1.join() and t2.join() ensure proper ordering.
B
The update() method is not synchronized, leading to non-atomic compound operations and a race condition.
C
The multiplication operation is inherently non-thread-safe in Java.
D
The update() method is thread-safe because arithmetic operations are atomic.
Question Leaderboard
Not enough data yet to show leaderboard.
APFIVE