Get invaluable Interview and Career Tips delivered directly to your inbox. Get your news alert set up today, Once you confirm your Email subscription, you will be able to download Job Inteview Questions Ebook . Please contact me if you there is any issue with the download.
Will there be a performance penalty if you make a method synchronized? If so, can you make any design changes to improve the performance
Editorial / Best Answer
Answered by: Faisal Ghauri
Performance does take a hit when using synchronization. I think the way to reduce this hit is to synchronize only a block of code that will be accessed by threads and not synchronize the entire method.
Related Answered Questions
Related Open Questions