Java: Pattern.compile()
<p>Consider following piece of code  </p>

<pre><code>for(int i=0;i&lt;10;i++)  
  Pattern p=Pattern.compile(someExpression);     
</code></pre>

<p>Will this java code cause same pattern to compile 10 times or will it compile only once when i=0?</p>