I am counting a counter till 1000000 , 50 times Using 2 threads. I am using lock , but I am getting different answer every time. Why it is happening so. I thought I will get the counter value exactly 1000000 , but it is not behaving that way. What may be the reason?I am counting a counter till 1000000 , 50 times