System.out.println , System.err.println
<p>I have this code:</p>

<pre><code> System.err.print("number of terms =   ");
 System.out.println(allTerms.size());
 System.err.print("number of documents =   ");
 System.out.print("number of documents =   ");
</code></pre>

<p>I think the results should be as this:</p>

<pre><code>number of terms = 10
number of documents =1000
</code></pre>

<p>but the results was </p>

<pre><code>10
1000
number of terms =   number of documents =
</code></pre>

<p>Why, and how to solve it?</p>
