title: Local variables in static method and thread safety
body: <p>I have a question about variable scope.</p>
  
  <p>For example:</p>
  
  <pre><code>class A {
      private static void test() {
          // do something with local variables
      }
  }
  </code></pre>
  
  <p>Now I make two threads, and create one instance of <code>A</code> for each thread.</p>
  
  <ol>
  <li><p>When I call <code>test()</code> in each thread, can I guarantee that <code>test()</code> is thread safe?</p></li>
  <li><p>Where are the local varibles in <code>test()</code> stored? Each threads' stack? Heap space?</p></li>
  </ol>
  
  <p>P.S. I know that static is totally pointless in this case. I found it in our legacy code; I just wanna make sure what I know!</p>