Here you can find the source of arrayIntsToString(int... lst)
Parameter | Description |
---|---|
lst | a parameter |
public static String arrayIntsToString(int... lst)
//package com.java2s; //License from project: Open Source License public class Main { /**//from ww w. j a v a 2 s. c o m * Convert an array of ints into a comma-separated string. * @param lst * @return */ public static String arrayIntsToString(int... lst) { String toReturn = ""; for (int i = 0; i < lst.length; i++) { toReturn = toReturn + Integer.toString(lst[i]) + ","; } return toReturn.subSequence(0, toReturn.length() - 1).toString(); } }