Java Long Number Array to String convertLongArrayToString(long[] value, String separator)

Here you can find the source of convertLongArrayToString(long[] value, String separator)

Description

convert Long Array To String

License

Open Source License

Declaration

public static String convertLongArrayToString(long[] value, String separator) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    public static String convertLongArrayToString(long[] value, String separator) {
        if (value.length == 0) {
            return "";
        }/* w  w w .  ja va2s.co  m*/
        StringBuilder sb = new StringBuilder();
        for (long v : value) {
            sb.append(v);
            sb.append(separator);
        }
        sb.setLength(sb.length() - separator.length());
        return sb.toString();
    }
}

Related

  1. convertLongArrayToString(Long[] longArray)
  2. longArrayAsString(long[] a)
  3. longArrayToString(int startIndex, long[] chars)
  4. longArrayToString(long[] longs)