code: private String listToString(String[] list, String quote, String beforeString, String afterString)
     {
        StringBuilder result = new StringBuilder();
  
        if (list != null && list.length > 0)
        {
           result.append(beforeString);
           result.append(quote + list[0] + quote);
           for (int i = 1; i < list.length; i++)
           {
              result.append(", " + quote + list[i] + quote);
           }
           result.append(afterString);
        }
  
        return result.toString();
     }
docs: Converts String[] to String using given notation:
  "beforeString+quote+element+quote+', '+quote+element...+quote+afterString"
  
  @param list
  Array to print
  @param quote
  Quote string for each element of array
  @param beforeString
  starting string
  @param afterString
  ending string
  @return