View Single Post

Old 02-29-2008, 08:38 AM   #3 (permalink)
christiaan_se
Member
 
Join Date: Feb 2008
Posts: 5
Hi,
it depends. The synchronized is not needed to guarantee that your singleton is indeed a singleton. That's what the synchronized on the static method getInstance() is for. If your myMethod() performs something that should be thread safe, you should make it synchronized.

kind regards,
Christiaan
christiaan_se is offline   Reply /w Quote -