Here you can find the source of printAlpha(double a[])
public static String printAlpha(double a[])
//package com.java2s; //License from project: Open Source License import java.text.DecimalFormat; public class Main { public static String printAlpha(double a[]) { DecimalFormat df = new DecimalFormat("0.0000"); StringBuilder sb = new StringBuilder(); sb.append(df.format(a[0]));/*ww w . j a v a 2s. com*/ for (int i = 1; i < a.length; ++i) { sb.append(" "); sb.append(df.format(a[i])); } return sb.toString(); } }