public static String commaSeparated(String... parts) {
    StringBuilder sb = new StringBuilder();
    String comma = ",";
    if (parts.length != 0) {
      sb.append(parts[0]);
    }
    for (int i = 1; i < parts.length; i++) {
      if (parts[i] != null && !parts[i].isEmpty()) {
        sb.append(comma);
        sb.append(parts[i]);
      }
    }
    return sb.toString();
  }
Combine the parts into a comma separated String

Example:
input: part1 = "foo" and part2 = "bar"
output = "foo,bar"

@param parts The parts to combine
@return The comma separated string
app/com/linkedin/drelephant/util/Utils.java