Java Array Convert to convertArray2String(String[] sources)

Here you can find the source of convertArray2String(String[] sources)

Description

convert Array String

License

Open Source License

Declaration

public static String convertArray2String(String[] sources) 

Method Source Code

//package com.java2s;

public class Main {

    public static String convertArray2String(String[] sources) {
        String result = "";
        if (sources == null || sources.length == 0) {
            return null;
        }/*from   w  w w.j  av a 2  s.  c o m*/
        for (String id : sources) {
            result += "'" + id + "',";
        }
        result = result.substring(0, result.length() - 1);
        return result;
    }
}

Related

  1. arrayToUpper(String[] values)
  2. arrayWithoutFirstsElement(final String[] array, final int elementsToRemove)
  3. convertArray(byte[] a)
  4. convertArray(Object columns[], int minLength)
  5. convertArray(String[] str)
  6. convertArrayIndexToShipLetter(int i)
  7. convertArrayToCSVString(String[] s)
  8. convertArrayToInteger(String[] input)
  9. convertArrayToLine(String[] cols)