Hi,
I have a Utility class with all static methods. By definition, static means only one instance.I m working on a multi-threaded application where I m using these static methods to do some work for me. I m making sure that I m not declaring and class level variables and restricting variables to the methods for
thread safety. I m also making sure the object references are not available outside of the method. I m hoping this would make my variables created in these static methods not accessible from outside threads.
I don't quite understand how a static method with only one instance could handle multiple threads safely. I know all method variables are placed in a stack and each thread has its own stack. But, does it mean there are multiple instances of these methods or are they accessing the only instance of the method. I would appreciate your thoughts on this topic.
Thanks,
Param