Java Array to String arrayToString(String[] array)

Here you can find the source of arrayToString(String[] array)

Description

array To String

License

LGPL

Declaration

public static String arrayToString(String[] array) 

Method Source Code

//package com.java2s;
//License from project: LGPL 

public class Main {
    public static String arrayToString(String[] array) {
        if ((array == null) || (array.length == 0)) {
            return "";
        }//from  w  w w .j a v a 2s  . co m

        StringBuilder sb = new StringBuilder();

        for (String s : array) {
            sb.append(';');
            sb.append(s);
        }

        return sb.substring(1);
    }
}

Related

  1. arrayToString(String[] array)
  2. arrayToString(String[] array)
  3. arrayToString(String[] array)
  4. arrayToString(String[] array)
  5. arrayToString(String[] array)
  6. arrayToString(String[] array)
  7. arrayToString(String[] array)
  8. arrayToString(String[] array)
  9. arrayToString(String[] array)