Java: Is the method Interger.toString() better than adding empty string to interger type value?
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/1572708/is-conversion-to-string-using-int-value-bad-practice">Is conversion to String using (&ldquo;&rdquo; + &lt;int value&gt;) bad practice?</a>  </p>
</blockquote>



<p>Hi there,</p>

<p>I am testing some Java codes with PMD rules. One of the rules for efficiency is a 'AddingEmptyString'. Below is a description for the rule.</p>

<blockquote>
  <p>Finds empty string literals which are being added. This is an inefficient way to convert any type to a String.</p>
</blockquote>

<pre><code>    String s = "" + 123; // bad 
    String t = Integer.toString(456); // ok 
</code></pre>

<p>Could you explain why Integer.toString is better than adding empty string to interger type value??</p>

<p>Thanks.
Jongseob Kwak</p>
