Java Integer Array to String intsToString(int[] ary)

Here you can find the source of intsToString(int[] ary)

Description

Converts an array of numbers to a string.

License

Open Source License

Declaration

public static final String intsToString(int[] ary) 

Method Source Code

//package com.java2s;

public class Main {
    /** Converts an array of numbers to a string.
     *///from  ww  w. j a v  a2 s  .c om
    public static final String intsToString(int[] ary) {
        if (ary == null || ary.length == 0)
            return "";

        final StringBuffer sb = new StringBuffer(50);
        for (int j = 0; j < ary.length; ++j) {
            if (j > 0)
                sb.append(',');
            sb.append(ary[j]);
        }
        return sb.toString();
    }
}

Related

  1. intArrayToString(int[] ints)
  2. intArrayToString(int[] ints)
  3. intArrayToString(String tag, int[] arr)
  4. intArrayToStringArray(int[] ids)
  5. intsToString(int ints[])
  6. intsToString(int[] b)
  7. intsToStrings(final int... numbers)
  8. intsToStrings(int[] intreps)
  9. toTextString(int[] array)