String
objects or primitives into String
s, but in this
case, it's clearer to use a method like String.valueOf
.
A quick-fix is suggested to simplify the concatenation.
Example:
void foo(int x, int y) {
String s = "" + x + " ; " + y;
}
After the quick-fix is applied:
void foo(int x, int y) {
String s = x + " ; " + y;
}
Use the Report only cases when empty string can be deleted without other changes
option to only report cases when empty string can be deleted
without conversion other operands with String.valueOf
.