Hallo Rani,
you make a loop of 3 iterations, starting from 50, subtracting 20 everytime for each
thread.
How could you expect a -30?
If you start from 50
first iteration 50 - 20 = 30
second iteration 30 - 20 = 10
third iteration 10 - 20 = -10
That's all.
You put to sleep thread named Fred for 2 seconds before the loop begins, so Lucy probably will be the first to complete method run. So it happens that while Fred is sleeping,Lucy complete her loop starting from 50 (30,10,-10) , then it's Fred's turn.