Originally posted by amitabh mehra: Two threads executing same method will have their separate copy of the local variables.
Yes, but it is possible for two local variables (references) to point to the same objects -- so it is not guaranteed to be thread safe.
Add the synchronized keyword to the method doesn't guaranteed threadsafe either -- as you need to have a synchronized object that is used by all accesses (that are not threadsafe).