Hi ramchander, I was not able to understand your question. Do you want to know the difference between synchronized blocks & synchronized methods? Can you elaborate your question?
Please try harder to explain your problem, because it's not very clear what you want to know. If it's about the difference between using a synchronized block and a synchronized method, note that the following two are equivalent: