title: "Inlining" in Java
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/2096361/are-there-inline-functions-in-java">Are there inline functions in java?</a>  </p>
  </blockquote>
  
  
  
  <p>I come from C++, where I would write </p>
  
  <pre><code>for (int i = 0; i &lt; numNonZero(); ++i)
  </code></pre>
  
  <p>knowing that numNonZero(), being very small and "inline" would simply vanish from the compiled code. How about in Java? Should I instead have an int _numNonZero in my class and write </p>
  
  <pre><code>for (int i = 0; i &lt; _numNonZero; ++i) 
  </code></pre>
  
  <p>for maximum speed?</p>