I am working in Java code optimization. I\'m unclear about the difference between String.valueOf or the +\"\" sign:
String.valueOf
+\"\"
int intVar = 1;
From the point of optimization , I will always prefer the String.valueOf() between the two. The first one is just a hack , trying to trick the conversion of the intVar into a String because the + operator.
String.valueOf()
intVar
String