Here you can find the source of arrayToLine(Object[] source)
Parameter | Description |
---|---|
source | array |
public static String arrayToLine(Object[] source)
//package com.java2s; //License from project: Open Source License public class Main { /**//from w w w . j a v a 2 s.c om * from array to string. * * @param source array * @return result of toString */ public static String arrayToLine(Object[] source) { if (source == null) { return ""; } StringBuffer buff = new StringBuffer(); for (int i = 0; i < source.length; i++) { if (i != 0) { buff.append(","); } buff.append(source[i]); } return buff.toString(); } }