I have a list of Strings, and I want to concatenate them with spaces in between. So I\'m using StringBuilder. Now if any of the Strings ar
String
StringBuilder
For my purpose, I needed to generalize Answer #2 a little bit. Here is the same function, taking Object as argument, instead of String:
private String nullToEmpty(Object obj) { return obj == null ? "" : obj.toString(); }