Ipfa Ovart

Greenhorn
+ Follow
since Mar 13, 2005
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Ipfa Ovart

Answer a would have been ok if the code was looking like this:



Here the incrementation of x and y is synchronized by the call to the static method. The lock is the same for each Test instance, unlike in the original piece of code.

Another solution :

[ March 13, 2005: Message edited by: Ipfa Ov ]