Java examples for java.lang:double Array
formats a double array to a string with spaces between values
//package com.java2s; public class Main { /**/* w ww . j a v a 2 s . co m*/ * formats a double array to a string with spaces between values * @param arr * @return */ public static String doubleArrayToString(double[] arr) { String ret = ""; int i = 0; for (double d : arr) { if (d > 0.0) { ret += " " + i + ":" + d; } i++; } return ret; } }