Possible Duplicate:
Is conversion to String using (“” + <int value>) bad practice?
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.
Finds empty string literals which are being added. This is an inefficient way to convert any type to a String.
String s = "" + 123; // bad
String t = Integer.toString(456); // ok
Could you explain why Integer.toString is better than adding empty string to integer type value?