I have some code like this:
StringBuilder rgba = new StringBuilder(); for (...){ .... rgba.append(value + ", "); } IntelliJ shows me the following warning:
string concatenation as argument to 'stringbuilder.append()' call From here, here and other sources I understand that concatenation is actually creates a new String object and that negates the whole point of using a StringBuilder.
So IntelliJsuggests me to use
rgba.append(value); rgba.append(", "); instead of
rgba.append(value + ", "); But will this really be better?
Will this code be clearer?
Will this make the execution faster?
appendcall, rather than throw concatenation in the mix