
"If two threads wants to execute a synchronized method in a class, and both threads are using the same instance of the class to invoke the method then only one thread can execute the method at a time." This is what i read in roseindia for sync thread can anyone give an perfect example for this??

Hi Friend,
Please visit the following link:
http://www.roseindia.net/java/thread/SynchronizedThreads.shtml
Thanks
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.