Java Array to String arrayToString(final T... data)

Here you can find the source of arrayToString(final T... data)

Description

array To String

License

Apache License

Declaration

@SafeVarargs
    public static <T> String arrayToString(final T... data) 

Method Source Code

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

public class Main {
    @SafeVarargs
    public static <T> String arrayToString(final T... data) {
        String sdata = "";
        for (final T o : data) {
            sdata += "," + o;
        }//  w w  w .jav a2  s .  c  o  m
        return sdata.substring(1);
    }

    public static String arrayToString(final boolean... data) {
        String sdata = "";
        for (final boolean o : data) {
            sdata += o ? 1 : 0;
        }
        return sdata;
    }
}

Related

  1. arrayToString(final Object[] array)
  2. arrayToString(final String[] args)
  3. arrayToString(final String[] strs)
  4. arrayToString(final String[] value)
  5. arrayToString(final String[] values)
  6. arrayToString(final T[] array)
  7. arrayToString(float[] a)
  8. arrayToString(float[] arg)
  9. arrayToString(float[][] array)