Difference b/w synchronized Method and synchronized statement in case of whole body of method cover by synchronized statement.

Showing Answers 1 - 3 of 3 Answers

Synchronization hits panelty on performance so when you want to only some portion of you method code synchoronized in that case use synchronized statement in you method. Otherwise if you wish whole your method synchronized use synchronized method.

  Was this answer useful?  Yes

md manzoor murshed

  • Aug 11th, 2006
 

Consider a situation when you need to call a method of some other application and assume that you don't have the source file access of that application...

How you make make the method synchronized??? In this situation you can make the caller statement a synchronized statement..

Thanks

Manzoor

  Was this answer useful?  Yes

Mallu Praveen

  • Sep 23rd, 2006
 

 Is it advantage for the hashmap since it is not synchronized

if so explain with an example where it is useful

and where we cannot use hashtable

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions