Java Decimal Format printAlpha(double a[])

Here you can find the source of printAlpha(double a[])

Description

print Alpha

License

Open Source License

Declaration

public static String printAlpha(double a[]) 

Method Source Code


//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();
    }
}

Related

  1. pad(double n)
  2. padding(final double number)
  3. padToMinWidth(double num, int minWidth)
  4. prettyPrintLatLon(double coord, boolean isCoordKindLat)
  5. print(double[] y)
  6. printAngle(double angle)
  7. printArray(String title, double[] vect)
  8. printArrayP(double[][] p)
  9. PrintWith1DecAnd000Sep(double Number)