hi, Rahul
It is a good statement for the basic concepts for sychronization, but srijan's question is not still solved.
Actually, sychronization solve the concurrency question, but it has two problems.
1) sychronizing each methods in a class is a bad idea, If it is done, the multithread machanism does not exist. Right? So sychronization should be applied in the appriciate situation.
2) the "philosopher problem" still exists in
Java multithread mechanism and is also caused by the sychronization. the prolem can be descripted as the following: 5 philosapher is sitting around a tale and wanna eat their dinner, but there are only 5 chop sticks at the table(you know, if they wanna eat at the same time, there have to be 10 chop sticks at the table). So they have to share the chop sticks, that is, only 2 philosophers can eat together and others have to wait.( of coz, they are stupid enough not to know go to kichen and bring other 5 chop sticks

). That means the sychronization cannot slove the concurrent prolem.
That is just my undertanding. Plz correct them if I make mistakes.
rgds
George
[This message has been edited by George Toronto (edited January 30, 2001).
[This message has been edited by George Toronto (edited January 30, 2001).]