Java Parse Double parseYuanToYi(Double data)

Here you can find the source of parseYuanToYi(Double data)

Description

parse Yuan To Yi

License

Open Source License

Declaration

public static Double parseYuanToYi(Double data) 

Method Source Code

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

import java.text.DecimalFormat;
import java.text.NumberFormat;

public class Main {
    public static Double parseYuanToYi(Double data) {
        // Double temp=data/100000000;
        if (data != null) {
            NumberFormat nf = new DecimalFormat("0.00");
            String tmp = nf.format(data / 100000000);
            return Double.valueOf(tmp);
        }//from  www.j a  va2s  . c o m
        return data;

    }
}

Related

  1. ParseDoubleEx(String s, double value_if_fault)
  2. parseDoubleInCurrentDefaultLocale(String text)
  3. parseInternationalDouble(String number)
  4. parseToCientificNotation(double value)
  5. parseToEngineeringNotation(double val, int decimalHouses)