Right now I'm using the following to minimize boxed object creation:
String myString = "" + myChar;
Is this the idiomatic way to do it? (IMHO it feels a little awkward.)
Right now I'm using the following to minimize boxed object creation:
String myString = "" + myChar;
Is this the idiomatic way to do it? (IMHO it feels a little awkward.)
String.valueOf(char) or Character.toString(char) (the latter calling the former)
String.valueOf is your friend:
I have a very short article on this subject, in fact.