Java Integer Array to String intArraytoString(int[] a)

Here you can find the source of intArraytoString(int[] a)

Description

int Arrayto String

License

Open Source License

Declaration

public static String intArraytoString(int[] a) 

Method Source Code

//package com.java2s;

public class Main {

    public static String intArraytoString(int[] a) {
        if (a == null)
            return "";
        int iMax = a.length - 1;
        if (iMax == -1)
            return "";
        StringBuilder b = new StringBuilder();
        for (int i = 0;; i++) {
            b.append(a[i]);//from  w  w  w.j  a  va2  s  .  c o m
            if (i == iMax)
                return b.toString();
            b.append(",");
        }
    }
}

Related

  1. intArray2String(int[] xs)
  2. intArrayAsString(int[] a)
  3. intArrayToString(final int... ints)
  4. intArrayToString(int vals[])
  5. intArrayToString(int[] a)
  6. intArrayToString(int[] a, String separator)
  7. intArrayToString(int[] arr)
  8. intArrayToString(int[] array)
  9. intArrayToString(int[] array, boolean whiteSpaceSeperator)