7

I saw multiple attempts to convert an int to a String by concatenating it with an empty String...
String s = someInt +"";

(I'm guessing the compiler uses a StringBuilder here which still ends up calling Integer.toString())

Comments
  • 2
    Concatenating is the easiest option according to the docs and it has no negative implications
    Doesn't seem bad to me
  • 0
    @bdhobare but why not just call the Integer.toString() yourself?
Add Comment