* This method iterates over the array of int data to comma separated String
*
* As an example : <blockquote>
*
* <pre>
* int []lmn = {1,2,3,4,5};
* The output achieved is : 1,2,3,4,5
* </pre>
*
* </blockquote>
*
* @param intArray
* The int array
* @return Concatenated string
*/
public static String toString(int[] intArray) {
String separator =
“,”;
StringBuilder sb =
new StringBuilder(“”);
if (intArray != null && intArray.length > 0) {
for (int i = 0; i < intArray.length; i++) {
sb.append(intArray[i]);
if (i < (intArray.length – 1)) {
sb.append(separator);
}
}
}
return sb.toString();
}