Java Array to String arrayToString(double d[])

Here you can find the source of arrayToString(double d[])

Description

array To String

License

Open Source License

Declaration

public static String arrayToString(double d[]) 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import java.text.DecimalFormat;

public class Main {
    public static DecimalFormat df = new DecimalFormat("#,###.##");

    public static String arrayToString(double d[]) {
        String s = "";
        for (int i = 0; i < d.length; i++) {
            s = s + df.format(d[i]);//from  ww  w .  j  a v  a 2  s  . c o m
            if (i < d.length - 1)
                s = s + ",";
        }
        return s;
    }
}

Related

  1. arrayToStr(String[] strArray)
  2. arrayToString(byte[] arg)
  3. arrayToString(byte[] array)
  4. arrayToString(byte[] bytes)
  5. arrayToString(byte[] source, int index, short size)
  6. arrayToString(double... a)
  7. arrayToString(double[] array)
  8. arrayToString(double[] array, String separator)
  9. arrayToString(double[] v)