Here you can find the source of getArrayAsString(double[] vals)
Parameter | Description |
---|---|
vals | is array of double |
public static String getArrayAsString(double[] vals)
//package com.java2s; /*/* w w w.j ava 2 s. co m*/ * Copyright (C) 2010-2014 Rotimi X Ojo, Andreas Maier * CONRAD is developed as an Open Source project under the GNU General Public License (GPL). */ import java.text.NumberFormat; public class Main { /** * Convert an array of doubles to semi-colon separated values * @param vals is array of double * @return an array of doubles to semi-colon separated values */ public static String getArrayAsString(double[] vals) { NumberFormat f = NumberFormat.getInstance(); f.setGroupingUsed(false); String arrayString = ""; for (int i = 0; i < vals.length; i++) { arrayString += f.format(vals[i]) + ";"; } return arrayString.trim(); } }