Java Decimal Format singleDecimalDigit(double d)

Here you can find the source of singleDecimalDigit(double d)

Description

single Decimal Digit

License

Open Source License

Declaration

public static String singleDecimalDigit(double d) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.text.DecimalFormat;

public class Main {
    public static String singleDecimalDigit(double d) {
        return new DecimalFormat("#.#").format(d);
    }//from  ww  w .  j  a v  a 2  s.  c o  m
}

Related

  1. randomGenLngLat(Double lngstart, Double lngend, Double latstart, Double latend)
  2. readThisDouble(final String value)
  3. renderDouble(double value, int precision)
  4. replaceCommaByPoint(String doubleString, Locale loc)
  5. sanitizeDouble(String value)
  6. string2Double(String s)
  7. strParaDouble(String s, double valorPadrao)
  8. to3DP(double number)
  9. toDecimalFromSexagesimalDegrees( final double sexagesimal)