Originally posted by Carlos G�mez:
Hi ranchers
why the local variables are thread safe ??
Thanks in advance.
Local variables are private to the method -- every method calls gets their own copy. Hence, every thread that calls a method, will get their own copy.
Note: they may *not* be thread safe. It is possible to assign an object reference (that is a local variable) to a shared object. While changing the local reference variable is threadsafe, changing the shared object that it refers to, may not be.
Henry