I want to append an integer to a string. Is there a difference between doing:
String str = "Number: " + myInt;
and
String str = "Number: " + Integer.toString(myInt);
In other words, should I bother using the Integer.toString()
method, when not necessary?
Edit: I am not wondering "How to convert an integer to string", but "if I am required to use a certain method, to convert".