About performance
1 posts in topic
Flat View  Flat View

Posted By:   manisha_chotaliya
Posted On:   Wednesday, June 15, 2005 08:22 AM

which will give better performance, a synchronized method or an unsynchronized method and how?

Re: About performance

Posted By:   Almagest_FUTT  
Posted On:   Wednesday, June 15, 2005 09:06 AM

When entering a synchronized block, the JVM has to aquire a lock... just say it has to do something. Something more than if the block weren't synchronized.
Therefore, an unsynchronized method will be executed faster.
About | Sitemap | Contact