Here you can find the source of arrayToString(int[] arr)
Parameter | Description |
---|---|
df | Decimal formatter |
arr | Array of double (7 elements) |
public static String arrayToString(int[] arr)
//package com.java2s; //License from project: Open Source License import java.text.DecimalFormat; public class Main { /**// w ww. ja va2s. c om * Convert an array of double that contains accuracy/completeness/correctness into a string (from the 1st..6th elements) * * @param df Decimal formatter * @param arr Array of double (7 elements) * * @return A string of double values */ public static String arrayToString(int[] arr) { String result = "[" + arr[0]; for (int i = 1; i < arr.length; i++) result += (";" + arr[i]); result += "]"; return result; } /** * Convert an array of double that contains accuracy/completeness/correctness into a string (from the 1st..6th elements) * * @param df Decimal formatter * @param arr Array of double (7 elements) * * @return A string of double values */ public static String arrayToString(DecimalFormat df, double[] arr) { String result = "[" + df.format(arr[0]); for (int i = 1; i < arr.length; i++) result += (";" + df.format(arr[i])); result += "]"; return result; } }