posted 13 years ago
hello friends
i am not understanding the output of the above program
as i have declared fname() method as synchronized so accrding to me output will be
0,1,2,3,4 for thread1
and 0,1,2,3,4 for thread2
or else i am doing mistake in my code can you explain that how we can achieve the desired output for different threads with the help of suitable example