Why this is so(see the below two code samples)? : <p>Code 1:</p>

<pre><code>public void displayQuantity(int number) {
    TextView quantityTV = (TextView) findViewById(R.id.quantity_tv);
    quantityTV.setText( " "+ number);
      }
</code></pre>

<p>Code 2:</p>

<pre><code> public void displayQuantity(int number) {
            TextView quantityTV = (TextView) findViewById(R.id.quantity_tv);
            quantityTV.setText(number);
         }
</code></pre>

<p>Why Code 2 gives error while code 1 doesn't??
There is a difference of - " __ " in b/w code 1 &amp; 2</p>
