title: Thread safety of method parameters in Java
body: <p>I would like to know if thread safety already plays a role when handling parameters of members in Java.</p>
  <p>Say you have a method of an API</p>
  <pre><code>boolean moreThanTen(long value) {
      if(value &gt; 10) return true;
      else return false;
  }
  </code></pre>
  <p>would this method be thread safe?</p>
  <p>I imagine it would since every thread has its own stack for local variables, and primitives are all stored in this local stack.</p>
  <p>The only thing that makes me unsure is the fact that a <code>long</code> would be two separate reads and thus is generally not thread safe.</p>
  <p>My question is: can I be sure that the parameter of a method gets copied atomically? So when using a primitive as a parameter (even <code>float</code>/<code>long</code>) can I be sure that during copying it to a local variable thread safety won't be an issue?</p>