// Collection of code snippets by Arne Vajhøj 
// (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) 
public class ArrayToString {
   public static String arr2str(int[] a) {
      StringBuffer sb = new StringBuffer("");
      for(int i = 0; i < a.length; i++) {
         if(i > 0) {
            sb.append(",");
         }
         sb.append(a[i]);
      }
      return sb.toString();
   }
   public static void main(String[] args) {
      int[] ia = {1, 2, 3 };
      System.out.println(arr2str(ia));
   }
}
